Skip to content
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

Disable convertStyleToAttrs plugin by default #1365

Merged
merged 1 commit into from Feb 22, 2021

Conversation

TrySound
Copy link
Member

@TrySound TrySound commented Feb 22, 2021

Ref #1362 #1360

From the spec:

Presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes.

Though we replace inline styles with attributes without checking if
thare is any <style> element. This makes the plugin unsafe and it
should not be enabled by default.

cc @sk- @strarsis

Ref #1362 #1360

From the [spec](https://www.w3.org/TR/SVG11/styling.html#UsingPresentationAttributes):

> Presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes.

Though we replace inline styles with attributes without checking if
thare is any `<style>` element. This makes the plugin unsafe and it
should not be enabled by default.
@strarsis
Copy link
Contributor

@TrySound: I agree that it should be disabled by default until better logic is added that takes the specificity into account.

@TrySound TrySound merged commit a1fcd03 into master Feb 22, 2021
@TrySound TrySound deleted the disable-convert-style-to-attrs branch February 22, 2021 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants