summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/Layout/input
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-05-23 18:14:47 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-24 06:43:21 +0200
commit71d5dc510e454935fe8f20ae8501fceb633db1ff (patch)
treec7283a26e3766b87333cfa05eb2db5be294f926a /Tests/LibWeb/Layout/input
parentdd19f615381fb887f44cceaf6a85281e64565689 (diff)
downloadserenity-71d5dc510e454935fe8f20ae8501fceb633db1ff.zip
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/ :^)
Diffstat (limited to 'Tests/LibWeb/Layout/input')
-rw-r--r--Tests/LibWeb/Layout/input/svg/svg-with-css-variable-in-presentation-hint.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/input/svg/svg-with-css-variable-in-presentation-hint.html b/Tests/LibWeb/Layout/input/svg/svg-with-css-variable-in-presentation-hint.html
new file mode 100644
index 0000000000..cfc01018d0
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/svg/svg-with-css-variable-in-presentation-hint.html
@@ -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)" /> \ No newline at end of file