third-party/csslib/parser
library
Classes
-
AllExtends
-
Find all @extend to create inheritance.
-
Analyzer
-
Analysis phase will validate/fixup any new CSS feature or any Sass style
feature.
-
Border
-
Supports border for measuring with layout.
-
BoxEdge
-
This class stores the sizes of the box edges in the CSS box model. Each
edge area is placed around the sides of the content box. The innermost area
is the
Style.padding
area which has a background and surrounds the
content. The content and padding area is surrounded by the Style.border
,
which itself is surrounded by the transparent Style.margin
. This box
represents the eges of padding, border, or margin depending on which
accessor was used to retrieve it.
-
CallMixin
-
Stamp out a mixin with the defined args substituted with the user's
parameters.
-
Color
-
General purpse Color class. Represent a color as an ARGB value that can be
converted to and from num, hex string, hsl, hsla, rgb, rgba and SVG pre-
defined color constant.
-
ColorBase
-
Base interface for Color, HSL and RGB.
-
DeclarationIncludes
-
Expand all @include inside of a declaration associated with a mixin.
-
ErrorToken
-
A token containing error information.
-
ExpandNestedSelectors
-
Traverse all rulesets looking for nested ones. If a ruleset is in a
declaration group (implies nested selector) then generate new ruleset(s) at
level 0 of CSS using selector inheritance syntax (flattens the nesting).
-
ExpressionsProcessor
-
-
Font
-
Font style support for size, family, weight, style, variant, and lineheight.
-
FontFamily
-
List of most common font families across different platforms. Use the
collection names in the Font class (e.g., Font.SANS_SERIF, Font.FONT_SERIF,
Font.MONOSPACE, Font.CURSIVE or Font.FANTASY). These work best on all
platforms using the fonts that best match availability on each platform.
See www.angelfire.com/al4/rcollins/style/fonts.html for a good
description of fonts available between platforms and browsers.
-
FontGeneric
-
Generic font family names.
-
FontStyle
-
Font style constants.
-
FontVariant
-
Font variant constants.
-
FontWeight
-
Font weight constants values 100, 200, 300, 400, 500, 600, 700, 800, 900.
-
Hsla
-
Hsl class support to interact with a color as a hsl with hue, saturation,
and lightness with optional alpha blending. The hue is a ratio of 360
degrees 360° = 1 or 0, (1° == (1/360)), saturation and lightness is a 0..1
fraction (1 == 100%) and alpha is a 0..1 fraction.
-
IdentifierToken
-
CSS ident-token.
-
InheritExtends
-
Changes any selector that matches @extend.
-
LineHeight
-
-
LiteralToken
-
A token containing a parsed literal value.
-
Message
-
A single message from the compiler.
-
MixinsAndIncludes
-
Remove all @mixin and @include and any NoOp used as placeholder for
@include.
-
Parser
-
Public parsing interface for csslib.
-
ParserState
-
Used for parser lookup ahead (used for nested selectors Less support).
-
PointXY
-
X,Y position.
-
PolyFill
-
CSS polyfill emits CSS to be understood by older parsers that which do not
understand (var, calc, etc.).
-
PreprocessorOptions
-
-
Rgba
-
Rgba class for users that want to interact with a color as a RGBA value.
-
Token
-
A single token in the Dart language.
-
TokenChar
-
-
Tokenizer
-
-
TokenizerBase
-
The base class for our tokenizer. The hand coded parts are in this file,
with the generated parts in the subclass Tokenizer.
-
TokenizerHelpers
-
Static helper methods.
-
TokenizerState
-
Tokenizer state to support look ahead for Less' nested selectors.
-
TokenKind
-
-
TopLevelIncludes
-
Expand all @include at the top-level the ruleset(s) associated with the
mixin.
Functions
-
analyze(List<StyleSheet> styleSheets, {List<Message>? errors, PreprocessorOptions? options})
→ void
-
Analyze the CSS file.
-
compile(dynamic input, {List<Message>? errors, PreprocessorOptions? options, bool nested = true, bool polyfill = false, List<StyleSheet>? includes})
→ StyleSheet
-
Parse and analyze the CSS file.
-
parse(dynamic input, {List<Message>? errors, PreprocessorOptions? options})
→ StyleSheet
-
Parse the
input
CSS style sheet into a tree. The input
can be a String,
or List<int> of bytes and returns a StyleSheet AST. The optional
errors
list will contain each error/warning as a Message.
-
parseSelectorGroup(dynamic input, {List<Message>? errors})
→ SelectorGroup?
-
-
selector(dynamic input, {List<Message>? errors})
→ StyleSheet
-
Parse the
input
CSS selector into a tree. The input
can be a String,
or List<int> of bytes and returns a StyleSheet AST. The optional
errors
list will contain each error/warning as a Message.