mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
This is according to the default user-agent style from the SVG2 spec. In order for this to work correctly, we also have to assign width and height to foreignObject boxes during SVG layout, since they are handled manually by SVGFormattingContext.
39 lines
820 B
CSS
39 lines
820 B
CSS
/* https://svgwg.org/svg2-draft/styling.html#UAStyleSheet */
|
|
|
|
@namespace url(http://www.w3.org/2000/svg);
|
|
@namespace xml url(http://www.w3.org/XML/1998/namespace);
|
|
|
|
svg:not(:root), image, marker, pattern, symbol { overflow: hidden; }
|
|
|
|
*:not(svg),
|
|
*:not(foreignObject) > svg {
|
|
transform-origin: 0 0;
|
|
}
|
|
|
|
*[xml|space=preserve] {
|
|
white-space-collapse: preserve-spaces;
|
|
}
|
|
|
|
/* NOTE: These rules are in the SVG spec, but don't match how other engines behave.
|
|
So we simply comment them out for now.
|
|
defs,
|
|
clipPath, mask, marker,
|
|
desc, title, metadata,
|
|
pattern, linearGradient, radialGradient,
|
|
script, style,
|
|
symbol {
|
|
display: none !important;
|
|
}
|
|
:host(use) > symbol {
|
|
display: inline !important;
|
|
}
|
|
*/
|
|
|
|
:link, :visited {
|
|
cursor: pointer;
|
|
}
|
|
|
|
foreignObject {
|
|
display: block;
|
|
overflow: hidden;
|
|
}
|