File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,18 @@ A `CSSGrammar` object is provided with a default grammar for CSS.
133
133
If you call `canonicalize()` without a grammar,
134
134
this is used automatically.
135
135
136
+ The return value is a nested structure of objects.
137
+ Each has a "type" key, set to either "stylesheet", "qualified-rule" or "at-rule".
138
+ Unless it's a statement at-rule,
139
+ each has a "rules" key set to an array of contained rules/declarations.
140
+ At-rules also have a "name" (string) and "prelude" (list of tokens for the part before the block).
141
+ Qualified rules have a "declarations",
142
+ which is an object mapping declaration name to value (list of tokens),
143
+ for ease of use
144
+ (all the declarations are in the `.rules` property already,
145
+ but this gives you easy access to them by name,
146
+ and only stores the last of each if they're repeated).
147
+
136
148
Node Integration
137
149
----------------
138
150
You can’t perform that action at this time.
0 commit comments