-
Notifications
You must be signed in to change notification settings - Fork 82
Add all SVG properties #97
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
Conversation
Thanks for the pull request. This has come up before and the question has always been whether or not all SVG CSS properties are valid in an HTML context. Before merging in such a change, I'd like to understand why all SVG CSS properties should be added vs. just the ones that are known to work with HTML. |
I understand that this tool was originally intended to be used with HTML CSS, but since SVG is a part of the HTML5 spec, HTML5 parsers can (must?) parse inline SVG, and those SVG elements can be styled in the same stylesheet as the HTML elements, I don't understand why parser-lib shouldn't work with SVG properties. I do see that if you accept SVG properties, attempting to use those properties to style HTML elements wouldn't cause an error, but that seems like a worthwhile trade off to me. I don't think attempting to use |
The difference is that one will never work, while one will sometimes work. |
Neither I just wish I didn't have to stop using parser-lib if I include any SVG styling in my stylesheets. |
Sorry about that - honestly, I didn't design this parser very well. It's |
Yeah, I understand the time constraint. What do you think about accepting this, then splitting the properties once it's been made configurable? I had to try. :-) If you're convinced it's a bad idea, I understand and I'll close this. |
I have no plans to make it configurable (once again, time constraints), so I'm not convinced it's a bad idea, I just don't have the time to make it be |
I'm closing this. I'd love to support SVG properties, but as @nzakas said, someone would need to do the work to make the parser more configurable. |
Just want to add a voice of support for this or similar PRs. The linter is flagging the property |
Adds all missing SVG properties.
Adds/updates validation for several SVG properties.
Adds tests for all added/modified properties.
Fixes #28 (which was originally opened as CSSLint/csslint#283).