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

Selectors and Values parsing #1035

Closed
iddan opened this issue Jun 7, 2017 · 6 comments
Closed

Selectors and Values parsing #1035

iddan opened this issue Jun 7, 2017 · 6 comments

Comments

@iddan
Copy link

iddan commented Jun 7, 2017

I was wondering: if PostCSS creates an AST of CSS shouldn't it also parse selectors and values? I've seen incredible work towards it in postcss/postcss-selector-parser and TrySound/postcss-value-parser and just wanted to make sure why isn't it part of the main parser.

@TrySound
Copy link
Member

TrySound commented Jun 7, 2017

@iddan In the beginning it was for performance reasons. Now we have a problem like custom syntax. If we will parse all stuff then we won't be able to introduce a lot of syntax sugar which is made postcss so popular and useful.

@iddan
Copy link
Author

iddan commented Jun 7, 2017

I know this is a problem @babel face as well. But as I see it custom syntax extensions should be registered in the parser level and code modifiers later.

@TrySound
Copy link
Member

TrySound commented Jun 7, 2017

It's different parser architecture which can break all existing stuff.

@iddan
Copy link
Author

iddan commented Jun 7, 2017

Not everything: only custom syntax plugins. I think it can be in a future major release as it is a reasonable breaking change.

@TrySound
Copy link
Member

TrySound commented Jun 7, 2017

Well, the discussion is here FYI.
#754

@TrySound TrySound closed this as completed Jun 7, 2017
@ai
Copy link
Member

ai commented Jun 7, 2017

We want this too and will add it to some future version.

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

3 participants