-
Notifications
You must be signed in to change notification settings - Fork 12
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
decide whether to support <style>
element; or explicitly error out
#296
Comments
Side note: this only happens if
|
oh, thanks for that. Yeah, the idea is that it is not supported. The fact that we silently gloss over it if it is inside defs was unintended. |
It would be good to set it to be ignorable instead of raising erro for some use cases. E.g. all files generated by Adobe Illustrator (as far as I've seen) always have one |
is it always there even if empty? Can you configure Illustrator to instead write the declaration as inlined style attributes? The thing is we don't have a full CSS parser so we don't support parsing the stylesheet, only individual css declaration inlined in style attributes. That style element may actually contain something important and ignoring it may lead to unexpectedly missing some piece of data. Remember that picosvg main goal was to simplify svg for the sake of producing color fonts. |
Ai always have a colour CSS even if not used, but yes there is a configuration to use inline style (but quite hidden in export for web menu). I do hope someday the style attribute will be parsed correctly 😂 |
currently we only support style attributes but not a
<style>
element. When the latter is present, picosvg ignores it silently but then produces incorrect results (e.g. if thefill
attributes are defined within the embedded stylesheet, then the paths will appear black).I propose for now we raise an error and request the user to fix the input.
The text was updated successfully, but these errors were encountered: