SyntaxKind Enum
The kinds of node, token, and trivia a CSS tree is made of.
public enum SyntaxKindRemarks
The tokens are those of the CSS tokenizer. Whitespace and comments are trivia rather than tokens, and the delimiters the grammars give a meaning to have a kind of their own; any other delimiter is a SyntaxKind.DelimToken. A keyword such as and or important stays an SyntaxKind.IdentToken, since CSS compares keywords without regard to case and a node already says what role each of its tokens plays.
Fields
| Name | Value | Description |
|---|---|---|
None | 0 | |
List | 1 | A sequence of children held in one slot. Shared by every language, and so fixed at 1. |
IdentToken | 8000 | An identifier, such as color or --main-color. |
FunctionToken | 8001 | An identifier followed by (, such as rgb(. Its value is the name without the parenthesis. |
AtKeywordToken | 8002 | @ followed by an identifier, such as @media. Its value is the name without the @. |
HashToken | 8003 | # followed by a name, such as #main or #fff. Its value is the name without the #. |
StringToken | 8004 | A quoted string. Its value is the text between the quotes, with the escapes resolved. |
BadStringToken | 8005 | A string that a line break ended before its closing quote. |
UrlToken | 8006 | An unquoted url(...). Its value is the address, with the escapes resolved. |
BadUrlToken | 8007 | An unquoted url(...) holding a character it cannot hold, such as a quote or whitespace in the middle. |
NumberToken | 8008 | A number, such as 12 or -0.5e3. |
PercentageToken | 8009 | A number followed by %. |
DimensionToken | 8010 | A number followed by a unit, such as 10px. |
CdoToken | 8011 | <!--, which the top level of a style sheet ignores. |
CdcToken | 8012 | -->, which the top level of a style sheet ignores. |
UnicodeRangeToken | 8013 | A U+0-7F range in the value of a unicode-range descriptor. |
ColonToken | 8100 | |
SemicolonToken | 8101 | |
CommaToken | 8102 | |
OpenBracketToken | 8103 | |
CloseBracketToken | 8104 | |
OpenParenToken | 8105 | |
CloseParenToken | 8106 | |
OpenBraceToken | 8107 | |
CloseBraceToken | 8108 | |
DelimToken | 8200 | A single character that is not part of any other token, and has no kind of its own. |
DotToken | 8201 | ., which starts a class selector. |
AsteriskToken | 8202 | *, the universal selector. |
AmpersandToken | 8203 | &, the nesting selector. |
GreaterThanToken | 8204 | |
LessThanToken | 8205 | |
EqualsToken | 8206 | |
PlusToken | 8207 | |
MinusToken | 8208 | |
TildeToken | 8209 | |
BarToken | 8210 | |, which separates a namespace prefix from a name. |
CaretToken | 8211 | |
DollarToken | 8212 | |
ExclamationToken | 8213 | !, which starts !important. |
SlashToken | 8214 | |
EndOfFileToken | 8400 | The end of the text. It holds the trivia after the last token. |
WhitespaceTrivia | 8500 | Spaces and tabs. |
EndOfLineTrivia | 8501 | A line break: \n, \r\n, \r, or a form feed. |
MultiLineCommentTrivia | 8502 | A /* ... */ comment. |
StyleSheet | 9000 | A whole style sheet. |
StyleRule | 9001 | A style rule, such as a { color: red }, whose prelude is a selector list. |
KeyframeRule | 9002 | A rule in a @keyframes block, such as from { opacity: 0 }. |
QualifiedRule | 9003 | A qualified rule that is neither a style rule nor a keyframe rule, such as one in an unknown at-rule. |
CharsetRule | 9010 | |
ImportRule | 9011 | |
NamespaceRule | 9012 | |
MediaRule | 9013 | |
SupportsRule | 9014 | |
ContainerRule | 9015 | |
LayerRule | 9016 | |
ScopeRule | 9017 | |
StartingStyleRule | 9018 | |
KeyframesRule | 9019 | |
FontFaceRule | 9020 | |
PageRule | 9021 | |
PageMarginRule | 9022 | A margin rule of a @page rule, such as @top-left. |
PropertyRule | 9023 | |
CounterStyleRule | 9024 | |
FontFeatureValuesRule | 9025 | |
FontFeatureValueBlockRule | 9026 | A feature block of a @font-feature-values rule, such as @swash or @styleset. |
FontPaletteValuesRule | 9027 | |
PositionTryRule | 9028 | |
ViewTransitionRule | 9029 | |
CustomMediaRule | 9030 | |
FunctionRule | 9031 | |
UnknownAtRule | 9049 | An at-rule this parser does not know, or a known one where it does not belong. |
Block | 9050 | The { ... } body of a rule. |
Declaration | 9051 | |
Important | 9052 | The !important at the end of a declaration. |
BadDeclaration | 9053 | Text in a block that is neither a declaration nor a rule, which a browser drops. |
IgnoredToken | 9054 | A token a style sheet or a block ignores, such as a stray ;. |
SkippedText | 9055 | Text the parser could not use, such as a block nested beyond the depth limit. |
TokenValue | 9100 | A component value that is a single token. |
Function | 9101 | |
ParenthesizedBlock | 9102 | A ( ... ) block. |
BracketedBlock | 9103 | A [ ... ] block. |
BracedBlock | 9104 | A { ... } block in a value. |
SkippedValue | 9105 | Values nested beyond the depth limit. |
GenericPrelude | 9106 | A prelude kept as component values, either because the rule has no grammar here or because it does not match it. |
SelectorList | 9200 | |
ComplexSelector | 9201 | |
ComplexSelectorPart | 9202 | |
ChildCombinator | 9203 | > |
NextSiblingCombinator | 9204 | + |
SubsequentSiblingCombinator | 9205 | ~ |
ColumnCombinator | 9206 | || |
CompoundSelector | 9207 | |
InvalidSelector | 9208 | An item of a forgiving selector list, such as the argument of :is(), that does not parse and so matches nothing. |
NamespacePrefix | 9209 | |
TypeSelector | 9210 | |
UniversalSelector | 9211 | |
NestingSelector | 9212 | |
IdSelector | 9213 | |
ClassSelector | 9214 | |
AttributeSelector | 9215 | |
PseudoClassSelector | 9216 | |
PseudoElementSelector | 9217 | |
FunctionalPseudoClassSelector | 9218 | |
FunctionalPseudoElementSelector | 9219 | |
NthArgument | 9220 | |
AnPlusB | 9221 | |
NameList | 9222 | |
ViewTransitionPartSelector | 9223 | |
NamePrelude | 9300 | |
ImportPrelude | 9301 | |
ImportLayer | 9302 | |
ImportSupports | 9303 | |
NamespacePrelude | 9304 | |
LayerName | 9305 | |
LayerPrelude | 9306 | |
ScopePrelude | 9307 | |
ScopeBoundary | 9308 | |
KeyframeSelectorList | 9309 | |
KeyframeSelector | 9310 | |
PageSelectorList | 9311 | |
PageSelector | 9312 | |
PseudoPage | 9313 | |
CustomMediaPrelude | 9314 | |
ContainerPrelude | 9315 | |
ContainerCondition | 9316 | |
ConditionPrelude | 9317 | |
MediaQueryList | 9400 | |
MediaTypeQuery | 9401 | |
MediaConditionQuery | 9402 | |
InvalidMediaQuery | 9403 | A media query that does not parse, which matches nothing without invalidating the rest of the list. |
NotCondition | 9410 | |
AndCondition | 9411 | |
OrCondition | 9412 | |
ParenthesizedCondition | 9413 | |
GeneralEnclosed | 9414 | A parenthesized or functional condition this parser has no grammar for. It is valid and evaluates to false. |
PlainFeature | 9415 | A feature with a value, such as (min-width: 600px). |
BooleanFeature | 9416 | A feature without a value, such as (hover). |
RangeFeature | 9417 | A feature compared to values, such as (400px <= width < 800px). |
LessThanComparison | 9418 | |
LessThanOrEqualComparison | 9419 | |
GreaterThanComparison | 9420 | |
GreaterThanOrEqualComparison | 9421 | |
EqualComparison | 9422 | |
FeatureValue | 9423 | |
DeclarationCondition | 9424 | A declaration used as a condition, such as (display: grid) in @supports. |
SelectorFunction | 9425 | selector() in @supports. |
FontTechFunction | 9426 | font-tech() in @supports. |
FontFormatFunction | 9427 | font-format() in @supports. |
AtRuleFunction | 9428 | at-rule() in @supports. |
StyleQuery | 9429 | style() in @container. |
ScrollStateQuery | 9430 | scroll-state() in @container. |