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

Improve CSS Support #3642

Merged
merged 3 commits into from
Feb 26, 2022
Merged

Conversation

matthiasblaesing
Copy link
Contributor

Introduce partitial support for CSS Selector Level 4 (:not, :where, :is)

Before:

before2

After:

after2

Improve parsing of the contents of @page declarations

Before:

before

After:

after

@matthiasblaesing matthiasblaesing added the CSS [ci] enable web job label Feb 19, 2022
@matthiasblaesing matthiasblaesing added this to the NB14 milestone Feb 19, 2022
@matthiasblaesing matthiasblaesing linked an issue Feb 19, 2022 that may be closed by this pull request
3 tasks
The semicolon is optional reading the examples. This change implements:
semicolons are required after property declarations, but not after
margin declarations.
@matthiasblaesing
Copy link
Contributor Author

I intent to merge this next weekend. If you want to object, feel free to do so.

Copy link
Contributor

@vieiro vieiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane. Good to see we're generating files from grammars. Just a little comment: we may want to regenerate files from grammars before compiling (in case one forgets to regenerate them by hand).

java/java.api.common/build.xml Show resolved Hide resolved
@matthiasblaesing matthiasblaesing merged commit b3d3266 into apache:master Feb 26, 2022
@matthiasblaesing matthiasblaesing deleted the css_ext branch February 26, 2022 17:48
@ebarboni
Copy link
Contributor

ebarboni commented Mar 3, 2022

Hi, I have a very naive question. I only see that for css we use antlr 3.x and the current antlr is 4.x. I'm not aware how many grammar we have in codebase. But would it be an idea to migrate to last ?

@matthiasblaesing
Copy link
Contributor Author

Without a good argument I think it would be no benefit. Rewriting the grammar just poses chances to break the code.

@vieiro
Copy link
Contributor

vieiro commented Mar 3, 2022

@ebarboni @matthiasblaesing AFAIK Antlr4 exposes the AST through the visitor pattern (or through events), i.e., you don't have it in memory. The migration Antlr3 to Antlr4 is not straightforward. You'll have to build the AST yourself (see, https://stackoverflow.com/questions/29971097/how-to-create-ast-with-antlr4 for instance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS [ci] enable web job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@bottom-center in html style not recognized
3 participants