checkbox input box-shadow size is wrongly limited
Categories
(Core :: Web Painting, defect, P3)
Tracking
()
People
(Reporter: vsync.design, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Steps to reproduce:
Go here:
https://jsbin.com/wihumem/edit?html,css,output
O use this CSS:
body {
height: 100vh;
}
input {
/* does not work as expected: */
box-shadow: 0 0 0 9999px yellow;
/* works as expected: /
/ outline: 9999px solid yellow; */
}
With this HTML:
<body>
<input type='checkbox'/>
</body>
Actual results:
Box-shadow extends barely 3 times the size of the (tiny) checkbox input
Expected results:
Checkbox input should have box-yellow shadow that extends outwards by 9999px pixels
| Reporter | ||
Comment 1•3 years ago
|
||
Works as expected in Chrome (tested on v109.0.5414.74)
| Reporter | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Comment 3•3 years ago
|
||
This is hitting the box-shadow fallback here because it's a native checkbox. As per that comment, we could do better and just provide the right rect to WebRender, but it's tricky to make sure stuff doesn't get out of sync. outline works, but doesn't account for the checkbox radii.
Apparently in Chromium:
- Checkbox radii is not accounted for (just like in our case for outline).
- For textboxes,
box-shadowdisables the native appearance (seems wrong / unfortunate).
We could implement that but it's unclear if the trade-offs are better. I guess we could disable the fallback path which might be nice but...
Description
•