37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import {styleTags, tags as t} from "@lezer/highlight"
|
|
|
|
export const cssHighlighting = styleTags({
|
|
"AtKeyword import charset namespace keyframes media supports": t.definitionKeyword,
|
|
"from to selector": t.keyword,
|
|
NamespaceName: t.namespace,
|
|
KeyframeName: t.labelName,
|
|
KeyframeRangeName: t.operatorKeyword,
|
|
TagName: t.tagName,
|
|
ClassName: t.className,
|
|
PseudoClassName: t.constant(t.className),
|
|
IdName: t.labelName,
|
|
"FeatureName PropertyName": t.propertyName,
|
|
AttributeName: t.attributeName,
|
|
NumberLiteral: t.number,
|
|
KeywordQuery: t.keyword,
|
|
UnaryQueryOp: t.operatorKeyword,
|
|
"CallTag ValueName": t.atom,
|
|
VariableName: t.variableName,
|
|
Callee: t.operatorKeyword,
|
|
Unit: t.unit,
|
|
"UniversalSelector NestingSelector": t.definitionOperator,
|
|
"MatchOp CompareOp": t.compareOperator,
|
|
"ChildOp SiblingOp, LogicOp": t.logicOperator,
|
|
BinOp: t.arithmeticOperator,
|
|
Important: t.modifier,
|
|
Comment: t.blockComment,
|
|
ColorLiteral: t.color,
|
|
"ParenthesizedContent StringLiteral": t.string,
|
|
":": t.punctuation,
|
|
"PseudoOp #": t.derefOperator,
|
|
"; ,": t.separator,
|
|
"( )": t.paren,
|
|
"[ ]": t.squareBracket,
|
|
"{ }": t.brace
|
|
})
|