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

PostCSS Compatibility Requests #26

Closed
shellscape opened this issue Mar 21, 2016 · 1 comment
Closed

PostCSS Compatibility Requests #26

shellscape opened this issue Mar 21, 2016 · 1 comment

Comments

@shellscape
Copy link

Great PostCSS plugin, thank you for creating it.

I would love to see this plugin and the nodes/tree it generates fall in line with the PostCSS patterns, as can be seen in the Container class; https://github.com/postcss/postcss/blob/master/lib/container.es6. That means that node collections would have methods like first, last, walk, walkWords, etc. and that each node in the tree returned has a type - along the same lines as how PostCSS rule nodes have a type of 'Rule'.

The source property for nodes in PostCSS contains starting column and line positions for nodes, and is essential for reporting purposes. Please do consider adding that property, with start and end properties for value nodes.

It would also be great to have the before and after properties part of a raws property to follow suit with PostCSS as well.

All of these suggestions would make it much more likely that PostCSS would consider integrating this into the main parser, and it will be easier to use overall for folks, as it follows the same patterns. The postcss-selector-parse, for example, follows the same patterns: https://github.com/postcss/postcss-selector-parser

Cheers

@shellscape
Copy link
Author

I decided to create a new project to meet our needs; it's a bit more advanced in the resulting AST and the features it provides over postcss-value-parser. https://github.com/lesshint/postcss-values-parser. I still appreciate this project and the work you've done @TrySound and have given you attribution in the readme.

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