Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Parser: Language Parser Features #57

Open
27 tasks
cookiengineer opened this issue Jan 31, 2021 · 0 comments
Open
27 tasks

CSS Parser: Language Parser Features #57

cookiengineer opened this issue Jan 31, 2021 · 0 comments

Comments

@cookiengineer
Copy link
Member

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 💩 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).

Animations Level 1

  • @keyframes
  • animation properties

Media Queries Level 3

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, or and only.
  • only as a keyword has no effect, and is only there to make legacy Browsers ignore the media query.

Conditional Rules Level 3

  • Rules can be nested recursively inside the body of a @media or @supports rule and therefore can contain both style-rule and at-rule inside them.

Values and Units Module Level 4

Numeric Data Types:

  • integer data type
  • number data type
  • dimension values
  • percentage values
  • ratio data type

Length Data Type

  • Relative Lengths
  • Absolute Lengths

Other Quantities

  • Angle Units
  • Duration Units
  • Frequency Units

Other Data Types

  • color data type
  • image data type
  • position data type (2d positioning)

Functions

  • attr() function
  • Mathematical Expressions

Paged Media Module Level 3

  • @page rule
  • Page Margin Boxes
  • Page Properties
  • Page Size
  • Page Breaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant