CSS Parser: Language Parser Features
The new recursive-descent Parser is now implemented and somewhat stable in its featureset. In order to implement the first language, the CSS Parser has to be written from scratch in order to have a real AST that's not limited by a line-by-line parsing approach.
The problem with CSS's specifications is that they are very unclear in regards to syntax, as they heavily rely on a generic "non-ASCII ident token" which pretty much can be everything, including the :hankey: emoji.
This issue tries to keep track of the relevant CSS specifications and their implications (to have a feature list of things that are not yet implemented).
- [ ]
@keyframes - [ ]
animationproperties
Reasons not to implement Media Queries Level 4 and 5: expressions inside the media-feature(s) can be endlessly chained, which is very likely malicious to some extend. Therefore >=, >, <, <= as operators are not being implemented, and only the and and or syntax will be supported.
- [ ]
@media - [ ]
@supports - [ ] Implement the conditions based on the correct precedence of
and,orandonly. - [ ]
onlyas a keyword has no effect, and is only there to make legacy Browsers ignore the media query.
- [ ] Rules can be nested recursively inside the body of a
@mediaor@supportsrule and therefore can contain bothstyle-ruleandat-ruleinside them.
Values and Units Module Level 4
Numeric Data Types:
- [ ]
integerdata type - [ ]
numberdata type - [ ]
dimensionvalues - [ ]
percentagevalues - [ ]
ratiodata type
Length Data Type
- [ ] Relative Lengths
- [ ] Absolute Lengths
Other Quantities
- [ ] Angle Units
- [ ] Duration Units
- [ ] Frequency Units
Other Data Types
- [ ]
colordata type - [ ]
imagedata type - [ ]
positiondata type (2d positioning)
Functions
- [ ]
attr()function - [ ] Mathematical Expressions
- [ ]
@pagerule - [ ] Page Margin Boxes
- [ ] Page Properties
- [ ] Page Size
- [ ] Page Breaks