rust-cssparser icon indicating copy to clipboard operation
rust-cssparser copied to clipboard

Add support for * prefix in declaration names

Open hamidrezakp opened this issue 1 year ago • 0 comments

Hey This is a hacky fix for adding support of legacy * prefixes to cssparser.

Currently this fails to be parsed:

p {
    *color: red;
}

And there is a good reason to it, This legacy syntax is only used for ie 6/7 and it's not valid css3 grammar too.

But some libraries and old codebases still depend on this kind of properties to work on old browsers.

I know this is not a correct way to do it, but if you have plans to add this feature to parser, i can prepare another fix that uses feature-gates in cargo.toml and has proper parsing methods for handling this kind of syntax.

hamidrezakp avatar May 25 '24 07:05 hamidrezakp