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
{{ message }}
Repository navigation
UA stylesheet seems to require title as display: none but browsers do display: inline #828
I think the intention of that rule in UA style sheet is to formalize the fact that these elements never render, and to make it clear that e.g. you can't add style="display: inline" to a defs and make it render. Despite this, there is the definition of never-rendered elements, which should also prevent them from rendering.
There's precedent in the HTML spec for having UA style sheet rules make certain elements be display:none, though it looks like most of them aren't also !important, and would actually render if made display:inline.
Thanks, that makes sense. Do you know if any browsers in the working group plan to actually implement this UA stylesheet, or would it be best to remove it and just use never-rendered?
Activity
heycam commentedon Mar 1, 2021
I think the intention of that rule in UA style sheet is to formalize the fact that these elements never render, and to make it clear that e.g. you can't add
style="display: inline"to adefsand make it render. Despite this, there is the definition of never-rendered elements, which should also prevent them from rendering.There's precedent in the HTML spec for having UA style sheet rules make certain elements be display:none, though it looks like most of them aren't also !important, and would actually render if made display:inline.
domenic commentedon Mar 1, 2021
Thanks, that makes sense. Do you know if any browsers in the working group plan to actually implement this UA stylesheet, or would it be best to remove it and just use never-rendered?
heycam commentedon Mar 1, 2021
Since nobody implements that right now, and it's not super important, we should probably just remove it.
karlcow commentedon Mar 3, 2026
Gecko, WebKit do not have an SVG css.
We can probably remove it from the spec.
https://w3c.github.io/svgwg/svg2-draft/styling.html#UAStyleSheet
karlcow commentedon Mar 5, 2026
There is a SVG css
https://searchfox.org/wubkat/source/Source/WebCore/css/svg.css
which is different than this one. Thanks @nikolaszimmermann
goldenboy777 commentedon Mar 5, 2026
SVG css on the Chromium, which also doesnt contain the above style, anyway
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/svg.css?q=svg.css
karlcow commentedon Mar 5, 2026
And the same for Firefox.
https://searchfox.org/firefox-main/source/layout/svg/svg.css
karlcow commentedon Mar 5, 2026
https://www.w3.org/2026/03/05-svg-minutes.html#c364
RESOLUTION: Drop display: inline AND display: none from SVG 2 in the UA stylesheet as requirement
dirkschulze commentedon Mar 11, 2026
RESOLUTION: Drop display: inline AND display: none from SVG 2 in the UA stylesheet as requirement
https://www.w3.org/2026/03/05-svg-minutes.html
karlcow commentedon Mar 11, 2026
@dirkschulze there is a PR for review for this one.