You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Merge style_traits::ToCss trait into cssparser::ToCss #438
cssparser and style_traits both have ToCss that are very similar, but have some slight differences. In order to simplify implementations, I'm happy to do the work to merge these (including the macro from style_derive into cssparser-macros), but I wanted to make sure there wasn't a reason for the split before I got started?
So unless there's a strong reason to, I'd rather not move the derive to cssparser at least. Having to bump cssparser for every derive improvement / change is a bit of a PITA.
What pain points are you hitting out of curiosity? What are you proposing the end state to be?
Good question and apologies for not leading with this! My hope is to be able to use #[derive(ToCss)] without taking a dependency on style_traits (which has deps and code I have no need for).
This is good reading, thank you! If I'm understanding correctly, the primary motivation of the split is the SequenceWriter, correct? I'm going to attempt to rewrite SequenceWriter without needing a custom CssWriter, and if this is possible then I think I should be able to remove the style_traits version, and the style_derive implementation can be made to work for cssparser::ToCss.
So unless there's a strong reason to, I'd rather not move the derive to cssparser at least. Having to bump cssparser for every derive improvement / change is a bit of a PITA.
Activity
emilio commentedon Aug 20, 2026
So unless there's a strong reason to, I'd rather not move the derive to cssparser at least. Having to bump cssparser for every derive improvement / change is a bit of a PITA.
emilio commentedon Aug 20, 2026
servo/servo#19838 has some of the context for the divergence.
What pain points are you hitting out of curiosity? What are you proposing the end state to be?
dislogical commentedon Aug 20, 2026
Good question and apologies for not leading with this! My hope is to be able to use
#[derive(ToCss)]without taking a dependency onstyle_traits(which has deps and code I have no need for).This is good reading, thank you! If I'm understanding correctly, the primary motivation of the split is the
SequenceWriter, correct? I'm going to attempt to rewriteSequenceWriterwithout needing a customCssWriter, and if this is possible then I think I should be able to remove thestyle_traitsversion, and thestyle_deriveimplementation can be made to work forcssparser::ToCss.This makes sense and is fair enough.