As mentioned in #52, ratiocinator strips all comments. One challenge in preserving them is that selectors are often removed or changed in the output, so comments for individual styles need to be rearranged in the output.
One possible algorithm:
- For each comment, find its closest selector
- Add a fake CSS property there, like
_comment whose value is the text of the comment
- Run the ratiocinator algorithm
- When outputting the resulting styles, look for the
_comment property, remove it, and print it as a comment above the style block
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
As mentioned in #52, ratiocinator strips all comments. One challenge in preserving them is that selectors are often removed or changed in the output, so comments for individual styles need to be rearranged in the output.
One possible algorithm:
_commentwhose value is the text of the comment_commentproperty, remove it, and print it as a comment above the style blockWant to back this issue? Post a bounty on it! We accept bounties via Bountysource.