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
There is a css rule in file ui.css, which goes like this...
path { stroke: currentColor; }
Now this rule is fairly innocent but when you have some SVG component as a Block tool, in my case, I am rendering Echarts as a block tool which uses SVG. Then this rules completely overtakes the styles of my svg->path element. Check this image below.
For this SVG, the stroke gets overridden by editor.js style...
This happens because SVGs style precendence works bit differently, Link
The presentation attributes thus will participate in the CSS2 cascade as if they were replaced by corresponding CSS style rules placed at the start of the author style sheet with a specificity of zero. In general, this means that the presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes.
There is no way to override this behaviour, So I am suggesting if ui.css style could be bit scoped, then this issue could be avoided.
Thanks in advance guys, up and up
The text was updated successfully, but these errors were encountered:
siddarthvader
changed the title
SVG->Path CSS overriding the CSS of block tool SVG component
CSS overriding the style of block tool SVG component
Mar 3, 2023
There is a css rule in file ui.css, which goes like this...
path { stroke: currentColor; }
Now this rule is fairly innocent but when you have some SVG component as a Block tool, in my case, I am rendering Echarts as a block tool which uses SVG. Then this rules completely overtakes the styles of my svg->path element. Check this image below.
For this SVG, the stroke gets overridden by editor.js style...
This happens because SVGs style precendence works bit differently, Link
There is no way to override this behaviour, So I am suggesting if ui.css style could be bit scoped, then this issue could be avoided.
Thanks in advance guys, up and up
The text was updated successfully, but these errors were encountered: