mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
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/ :^)
This commit is contained in:
parent
dd19f61538
commit
71d5dc510e
3 changed files with 32 additions and 1 deletions
|
@ -0,0 +1,10 @@
|
|||
<!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)" />
|
Loading…
Add table
Add a link
Reference in a new issue