Skip to content

Commit 711e039

Browse files
committed
add non-goals section to readme
1 parent 89fc8fe commit 711e039

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,7 @@ Built for speed and efficiency, this parser handles large CSS files with minimal
1313
- **Error recovery** - Continues parsing on malformed CSS
1414
- **Comment preservation** - Comments stored as first-class AST nodes
1515
- **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
2817

2918
## Installation
3019

@@ -66,10 +55,24 @@ for (const rule of ast) {
6655
}
6756
```
6857

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+
6968
## Documentation
7069

7170
See [API.md](./API.md) for complete documentation of all parser functions and options.
7271

72+
## Non-goals
73+
74+
- **No syntax validation** - this parser does not try to validate your CSS structure. Everything can be anything
75+
7376
## License
7477

7578
MIT

0 commit comments

Comments
 (0)