You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,18 +13,7 @@ Built for speed and efficiency, this parser handles large CSS files with minimal
13
13
-**Error recovery** - Continues parsing on malformed CSS
14
14
-**Comment preservation** - Comments stored as first-class AST nodes
15
15
-**Location tracking** - Line, column, offset, and length for all nodes
16
-
-**Vendor prefix detection** - Automatic detection of `-webkit-`, `-moz-`, etc.
17
-
-**Structured parsing** - Deep parsing of selectors, values, and at-rule preludes
18
-
19
-
## Performance
20
-
21
-
-**Tiny install size**
22
-
-**Zero allocations during parsing** - all memory allocated upfront based on real world heuristics, which also helps prevent garbage collection running often
23
-
-**Cache-friendly data layout** - contiguous memory for sequential access
24
-
-**First-class comment and location support** - while still being performant because analysis requires constant access to lines and columns
25
-
-**No syntax validation** - focusing only on the raw data we can skip expensive syntax files and MDN data syncs
26
-
27
-
This parser was heavily influenced by [CSSTree](https://github.com/csstree/csstree), one of the most robust CSS parsers available.
16
+
-**Built-in vendor prefix detection** - Automatic detection of `-webkit-`, `-moz-`, etc. for selectors, values, properties and more
28
17
29
18
## Installation
30
19
@@ -66,10 +55,24 @@ for (const rule of ast) {
66
55
}
67
56
```
68
57
58
+
## Performance
59
+
60
+
-**Tiny install size**
61
+
-**Zero allocations during parsing** - all memory allocated upfront based on real world heuristics, which also helps prevent garbage collection running often
62
+
-**Cache-friendly data layout** - contiguous memory for sequential access powered by concepts or Data Oriented Design
63
+
-**First-class comment and location support** - while still being performant because analysis requires constant access to lines and columns
64
+
-**No syntax validation** - focusing only on the raw data we can skip expensive syntax files and MDN data syncs
65
+
66
+
This parser was heavily influenced by [CSSTree](https://github.com/csstree/csstree), one of the most robust CSS parsers available.
67
+
69
68
## Documentation
70
69
71
70
See [API.md](./API.md) for complete documentation of all parser functions and options.
72
71
72
+
## Non-goals
73
+
74
+
-**No syntax validation** - this parser does not try to validate your CSS structure. Everything can be anything
0 commit comments