package css_ast

Import Path
	github.com/evanw/esbuild/internal/css_ast (on go.dev)

Dependency Relation
	imports 3 packages, and imported by 4 packages

Involved Source Files css_ast.go css_decl_table.go
Package-Level Type Names (total 24, all are exported)
/* sort exporteds by: | */
ImportRecords []ast.ImportRecord Rules []R func github.com/evanw/esbuild/internal/cache.(*CSSCache).Parse(log logger.Log, source logger.Source, options css_parser.Options) AST func github.com/evanw/esbuild/internal/css_parser.Parse(log logger.Log, source logger.Source, options css_parser.Options) AST func github.com/evanw/esbuild/internal/css_printer.Print(tree AST, options css_printer.Options) string
Selectors []CompoundSelector
// Optional, may be "" // "&" // If present, these follow a ":" character SubclassSelectors []SS TypeSelector *NamespacedName
const DAlignContent const DAlignItems const DAlignmentBaseline const DAlignSelf const DAll const DAnimation const DAnimationDelay const DAnimationDirection const DAnimationDuration const DAnimationFillMode const DAnimationIterationCount const DAnimationName const DAnimationPlayState const DAnimationTimingFunction const DBackfaceVisibility const DBackground const DBackgroundAttachment const DBackgroundClip const DBackgroundColor const DBackgroundImage const DBackgroundOrigin const DBackgroundPosition const DBackgroundPositionX const DBackgroundPositionY const DBackgroundRepeat const DBackgroundSize const DBaselineShift const DBlockSize const DBorder const DBorderBlockEnd const DBorderBlockEndColor const DBorderBlockEndStyle const DBorderBlockEndWidth const DBorderBlockStart const DBorderBlockStartColor const DBorderBlockStartStyle const DBorderBlockStartWidth const DBorderBottom const DBorderBottomColor const DBorderBottomLeftRadius const DBorderBottomRightRadius const DBorderBottomStyle const DBorderBottomWidth const DBorderCollapse const DBorderColor const DBorderImage const DBorderImageOutset const DBorderImageRepeat const DBorderImageSlice const DBorderImageSource const DBorderImageWidth const DBorderInlineEnd const DBorderInlineEndColor const DBorderInlineEndStyle const DBorderInlineEndWidth const DBorderInlineStart const DBorderInlineStartColor const DBorderInlineStartStyle const DBorderInlineStartWidth const DBorderLeft const DBorderLeftColor const DBorderLeftStyle const DBorderLeftWidth const DBorderRadius const DBorderRight const DBorderRightColor const DBorderRightStyle const DBorderRightWidth const DBorderSpacing const DBorderStyle const DBorderTop const DBorderTopColor const DBorderTopLeftRadius const DBorderTopRightRadius const DBorderTopStyle const DBorderTopWidth const DBorderWidth const DBottom const DBoxShadow const DBoxSizing const DBreakAfter const DBreakBefore const DBreakInside const DCaptionSide const DCaretColor const DClear const DClip const DClipPath const DClipRule const DColor const DColorInterpolation const DColorInterpolationFilters const DColumnCount const DColumnFill const DColumnGap const DColumnRule const DColumnRuleColor const DColumnRuleStyle const DColumnRuleWidth const DColumns const DColumnSpan const DColumnWidth const DContent const DCounterIncrement const DCounterReset const DCssFloat const DCssText const DCursor const DDirection const DDisplay const DDominantBaseline const DEmptyCells const DFill const DFillOpacity const DFillRule const DFilter const DFlex const DFlexBasis const DFlexDirection const DFlexFlow const DFlexGrow const DFlexShrink const DFlexWrap const DFloat const DFloodColor const DFloodOpacity const DFont const DFontFamily const DFontFeatureSettings const DFontKerning const DFontSize const DFontSizeAdjust const DFontStretch const DFontStyle const DFontSynthesis const DFontVariant const DFontVariantCaps const DFontVariantEastAsian const DFontVariantLigatures const DFontVariantNumeric const DFontVariantPosition const DFontWeight const DGap const DGlyphOrientationVertical const DGrid const DGridArea const DGridAutoColumns const DGridAutoFlow const DGridAutoRows const DGridColumn const DGridColumnEnd const DGridColumnGap const DGridColumnStart const DGridGap const DGridRow const DGridRowEnd const DGridRowGap const DGridRowStart const DGridTemplate const DGridTemplateAreas const DGridTemplateColumns const DGridTemplateRows const DHeight const DHyphens const DImageOrientation const DImageRendering const DInlineSize const DJustifyContent const DJustifyItems const DJustifySelf const DLeft const DLetterSpacing const DLightingColor const DLineBreak const DLineHeight const DListStyle const DListStyleImage const DListStylePosition const DListStyleType const DMargin const DMarginBlockEnd const DMarginBlockStart const DMarginBottom const DMarginInlineEnd const DMarginInlineStart const DMarginLeft const DMarginRight const DMarginTop const DMarker const DMarkerEnd const DMarkerMid const DMarkerStart const DMask const DMaskComposite const DMaskImage const DMaskPosition const DMaskRepeat const DMaskSize const DMaskType const DMaxBlockSize const DMaxHeight const DMaxInlineSize const DMaxWidth const DMinBlockSize const DMinHeight const DMinInlineSize const DMinWidth const DObjectFit const DObjectPosition const DOpacity const DOrder const DOrphans const DOutline const DOutlineColor const DOutlineOffset const DOutlineStyle const DOutlineWidth const DOverflow const DOverflowAnchor const DOverflowWrap const DOverflowX const DOverflowY const DOverscrollBehavior const DOverscrollBehaviorBlock const DOverscrollBehaviorInline const DOverscrollBehaviorX const DOverscrollBehaviorY const DPadding const DPaddingBlockEnd const DPaddingBlockStart const DPaddingBottom const DPaddingInlineEnd const DPaddingInlineStart const DPaddingLeft const DPaddingRight const DPaddingTop const DPageBreakAfter const DPageBreakBefore const DPageBreakInside const DPaintOrder const DPerspective const DPerspectiveOrigin const DPlaceContent const DPlaceItems const DPlaceSelf const DPointerEvents const DPosition const DQuotes const DResize const DRight const DRotate const DRowGap const DRubyAlign const DRubyPosition const DScale const DScrollBehavior const DShapeRendering const DStopColor const DStopOpacity const DStroke const DStrokeDasharray const DStrokeDashoffset const DStrokeLinecap const DStrokeLinejoin const DStrokeMiterlimit const DStrokeOpacity const DStrokeWidth const DTableLayout const DTabSize const DTextAlign const DTextAlignLast const DTextAnchor const DTextCombineUpright const DTextDecoration const DTextDecorationColor const DTextDecorationLine const DTextDecorationStyle const DTextEmphasis const DTextEmphasisColor const DTextEmphasisPosition const DTextEmphasisStyle const DTextIndent const DTextJustify const DTextOrientation const DTextOverflow const DTextRendering const DTextShadow const DTextTransform const DTextUnderlinePosition const DTop const DTouchAction const DTransform const DTransformBox const DTransformOrigin const DTransformStyle const DTransition const DTransitionDelay const DTransitionDuration const DTransitionProperty const DTransitionTimingFunction const DTranslate const DUnicodeBidi const DUnknown const DUserSelect const DVerticalAlign const DVisibility const DWhiteSpace const DWidows const DWidth const DWillChange const DWordBreak const DWordSpacing const DWordWrap const DWritingMode const DZIndex const DZoom
Rules []R Selectors []string
This is an identifier or "*" or "&" If present, this is an identifier or "*" and is followed by a "|" character
Kind css_lexer.T Text string
This interface is never called. Its purpose is to encode a variant type in Go's type system. *RAtCharset *RAtImport *RAtKeyframes *RBadDeclaration *RDeclaration *RKnownAt *RQualified *RSelector *RUnknownAt
Encoding string *T : R
ImportRecordIndex uint32 *T : R
AtToken string Blocks []KeyframeBlock Name string *T : R
Tokens []Token *T : R
Important bool // Compare using this instead of "Key" for speed KeyRange logger.Range KeyText string Value []Token *T : R
AtToken string Prelude []Token Rules []R *T : R
Prelude []Token Rules []R *T : R
Rules []R Selectors []ComplexSelector *T : R
AtToken string Block []Token Prelude []Token *T : R
This interface is never called. Its purpose is to encode a variant type in Go's type system. *SSAttribute *SSClass *SSHash *SSPseudoClass
MatcherModifier byte MatcherOp string MatcherValue string NamespacedName NamespacedName *T : SS
Name string *T : SS
Name string *T : SS
Args []Token Name string *T : SS
We create a lot of tokens, so make sure this layout is memory-efficient. The layout here isn't optimal because it biases for convenience (e.g. "string" could be shorter) but at least the ordering of fields was deliberately chosen to minimize size. Contains the child tokens for component values that are simple blocks. These are either "(", "{", "[", or function tokens. The closing token is implicit and is not stored. // 8 bytes URL tokens have an associated import record at the top-level of the AST. This index points to that import record. // 4 bytes This will never be "TWhitespace" because whitespace isn't stored as a token directly. Instead it is stored in "HasWhitespaceAfter" on the previous token. This is to make it easier to pattern-match against tokens when handling CSS rules, since whitespace almost always doesn't matter. That way you can pattern match against e.g. "rgb(r, g, b)" and not have to handle all possible combinations of embedded whitespace tokens. There is one exception to this: when in verbatim whitespace mode and the token list is non-empty and is only whitespace tokens. In that case a single whitespace token is emitted. This is because otherwise there would be no tokens to attach the whitespace before/after flags to. // 1 byte This is the raw contents of the token most of the time. However, it contains the decoded string contents for "TString" tokens. // 16 bytes The division between the number and the unit for "TDimension" tokens. // 2 bytes These flags indicate the presence of a "TWhitespace" token before or after this token. There should be whitespace printed between two tokens if either token indicates that there should be whitespace. Note that whitespace may be altered by processing in certain situations (e.g. minification). // 1 byte ( T) DimensionUnit() string ( T) DimensionValue() string ( T) PercentValue() string
const WhitespaceAfter const WhitespaceBefore
Package-Level Variables (only one, which is exported)
Package-Level Constants (total 318, all are exported)
const DAll D = 5
const DClear D = 86
const DClip D = 87
const DColor D = 90
const DCursor D = 108
const DFill D = 113
const DFilter D = 116
const DFlex D = 117
const DFloat D = 124
const DFont D = 127
const DGap D = 143
const DGrid D = 145
const DHeight D = 163
const DLeft D = 171
const DMargin D = 180
const DMarker D = 189
const DMask D = 193
const DOrder D = 211
const DQuotes D = 248
const DResize D = 249
const DRight D = 250
const DRotate D = 251
const DRowGap D = 252
const DScale D = 255
const DStroke D = 260
const DTop D = 290
const DWidows D = 307
const DWidth D = 308
const DZIndex D = 314
const DZoom D = 315