-
Notifications
You must be signed in to change notification settings - Fork 98
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
Implement serialize() that preserves formatting and comments #27
Comments
This will be awesome, how do you plan on storing the whitespace? Will it be possible to serialize specific rulesets, rules etc?
This combined with a way to determine the index in the original text would be quite powerful. Each rule could contain an integer offset within it's parent, this way you could get a "live" index by summing all the previous sibling offsets and parent offsets:
|
Yes, yes, and yes. I hope to release it on the next weekends. |
Excellent! Will the whitespace be stored as separate nodes/objects? I mentioned in a previous ticket adding support for Less-style nested rules which I can see now doesn't really belong in this project. What would be nice is a way to plug in addition features like this, it there likely to be an API with hooks allowing this kind of thing as I don't really fancy forking the project just for this? Also lack of older IE support is a bit of an issue in my use case, would you accept a patch with a kind of ieCompat option? It would obviously have to get around getters and setters in another way. |
Any news on this? Especially on comments — the CSSOM is used in Stylus' CSS to Stylus convertor and the lack of them in there is bad, 'cause we want them to stay there in the code after conversion :( |
I'm working on it.
The text was updated successfully, but these errors were encountered: