RESOLVED FIXED 109229
CSS Unit vw in border-width maps to 0px.
https://bugs.webkit.org/show_bug.cgi?id=109229
Summary CSS Unit vw in border-width maps to 0px.
Thaddee Tyl
Reported 2013-02-07 13:51:43 PST
At the following URL: <http://espadrine.github.com/aulx/>, you may notice the following CSS rule: hgroup { border: 0.4vw solid rgba(188,188,196,0.3); } Any vw unit that I tried in the border (or in any border at all, see <http://jsbin.com/avirem/1>) made the border width be 0px, which is invalid. However, it does parse the rule fine. - It should be valid as per the spec, - It works on Firefox 19+, - WebKit seems to accept the percentage type, which isn't allowed by the spec (but I assume works similarly).
Attachments
Test case (256 bytes, text/html)
2013-04-20 00:21 PDT, Stuart P. Bentley
no flags
Patch (14.91 KB, patch)
2013-09-12 03:18 PDT, gur.trio
no flags
Stuart P. Bentley
Comment 1 2013-04-20 00:19:33 PDT
Stuart P. Bentley
Comment 2 2013-04-20 00:21:56 PDT
Stuart P. Bentley
Comment 3 2013-04-20 00:29:02 PDT
Also, I don't see the percentage type working for borders (I set it to 30% and it didn't change).
Stuart P. Bentley
Comment 4 2013-04-20 00:34:51 PDT
In general, viewport-percentage lengths (vw, vh, vmin, and vmax) don't work for: - border(-width) - outline(-width) - (-webkit-)box-shadow
Thierry Michel
Comment 5 2013-05-21 03:56:04 PDT
It's the same on Mac OS X (10.8.3) with : - Chrome / Version 26.0.1410.65 - Chrome Canary / Version 28.0.1499.0 canary I also noticed that viewport units map to -1px with box-shadow property...
gur.trio
Comment 6 2013-09-12 03:18:45 PDT
gur.trio
Comment 7 2013-09-12 03:20:13 PDT
(In reply to comment #6) > Created an attachment (id=211414) [details] > Patch Added patch for handling border/outline properties incase units are in vh/vw units. It was crashing incase border is given in vh/vw units. Darin and Simon please can you'll review this?
WebKit Commit Bot
Comment 8 2013-09-12 09:43:24 PDT
Comment on attachment 211414 [details] Patch Clearing flags on attachment: 211414 Committed r155624: <http://trac.webkit.org/changeset/155624>
WebKit Commit Bot
Comment 9 2013-09-12 09:43:27 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.