ladybird/Tests/LibWeb/Layout/input/svg/svg-with-css-variable-in-presentation-hint.html
Andreas Kling 71d5dc510e LibWeb: Resolve CSS variables if present in SVG presentation attributes
SVG presentation attributes are parsed as CSS values, so we also need to
handle CSS variable expansion when handling them.

This (roughly) matches the behavior of other engines. It's also used on
the web, for example on https://stripe.com/ :^)
2023-05-24 06:43:21 +02:00

10 lines
No EOL
268 B
HTML

<!doctype html><style>
:root {
--huge: 5px;
}
svg {
width: 100px;
height: 100px;
border: 1px solid black;
}
</style><svg viewBox="0 0 10 10"><rect x=4.5 y=4.5 width=1 height=1 stroke="green" stroke-width="var(--huge)" />