Skip to content

Commit 1f54f75

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Test that lh units are calculated before select fixup
Per resolution in [1], lh units should be computed before any fixups to line-height for form controls. Add a test for <select> elements. [1] w3c/csswg-drafts#3257 (comment) Bug: 937104 Change-Id: Id9987dc1d9a2c7b7a6e006cbfdd431e07379196b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3955838 Commit-Queue: Rune Lillesveen <[email protected]> Reviewed-by: Ian Kilpatrick <[email protected]> Cr-Commit-Position: refs/heads/main@{#1059314}
1 parent 65a367d commit 1f54f75

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

css/css-values/lh-unit-004.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>CSS Values and Units Test: lh not affected by &lt;select&gt; fixup</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-values-4/#font-relative-lengths">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<style>
8+
select {
9+
line-height: 100px;
10+
width: 5lh;
11+
}
12+
</style>
13+
<select id="lh"></select>
14+
<script>
15+
test(() => {
16+
assert_equals(getComputedStyle(lh).width, "500px");
17+
}, "lh must be relative to computed line-height before select element fixup");
18+
</script>

0 commit comments

Comments
 (0)