Intent to Implement and Ship: CSS: Support 'q' length unit

77 views
Skip to first unread message

HwanSeung Lee

unread,
Aug 22, 2017, 10:16:26 AM8/22/17
to blink-dev, ericwi...@chromium.org, tk...@chromium.org

Contact emails

hs121...@samsung.com, ericwi...@chromium.org


Spec

https://www.w3.org/TR/2015/CR-css-values-3-20150611/#absolute-lengths

https://drafts.csswg.org/css-values/#absolute-lengths


Summary

support ‘q’ absolute length unit in css. 1q is equivalent to 1/40th of 1cm.


Motivation

web developers will have various opportunity which they choose length unit.


Interoperability and Compatibility Risk

Edge: No signals

Firefox: Shipped

Safari: No signals

Web developers:No signals


Ongoing technical constraints

None


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes


Is this feature fully tested by web-platform-tests?

http://w3c-test.org/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html


OWP launch tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=421907


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/5983903483428864


Requesting approval to ship?

Yes


Emil A Eklund

unread,
Aug 22, 2017, 12:26:12 PM8/22/17
to HwanSeung Lee, blink-dev, ericwi...@chromium.org, TAMURA, Kent
For others that are curious about the name,
q stands for quarter-millimeters.

cm centimeters 1cm = 96px/2.54
mm millimeters 1mm = 1/10th of 1cm
q quarter-millimeters 1q = 1/40th of 1cm
in inches 1in = 2.54cm = 96px
pc picas 1pc = 1/6th of 1in
pt points 1pt = 1/72th of 1in
px pixels 1px = 1/96th of 1in

Aleks Totic

unread,
Aug 22, 2017, 12:29:44 PM8/22/17
to Emil A Eklund, blink-dev, ericwi...@chromium.org, TAMURA, Kent
I just curious. Why Q when we already have mm? Feels like an American
Imperial takeover of the metric system.

Aleks
> --
> You received this message because you are subscribed to the Google Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADu_oUC3AU%3D_rK67DN5%2BbufPNxSZ%2Bg06aEmQ7%3DM-pgoc4GnX8g%40mail.gmail.com.
>

Emil A Eklund

unread,
Aug 22, 2017, 12:34:54 PM8/22/17
to Aleks Totic, blink-dev, ericwi...@chromium.org, TAMURA, Kent
On Tue, Aug 22, 2017 at 9:29 AM, 'Aleks Totic' via blink-dev
<blin...@chromium.org> wrote:
> I just curious. Why Q when we already have mm? Feels like an American
> Imperial takeover of the metric system.

I'm not quite sure where it came from and it does seem a bit odd.

Anne van Kesteren

unread,
Aug 22, 2017, 12:40:39 PM8/22/17
to Emil A Eklund, Aleks Totic, blink-dev, ericwi...@chromium.org, TAMURA, Kent
On Tue, Aug 22, 2017 at 6:34 PM, Emil A Eklund <e...@chromium.org> wrote:
> I'm not quite sure where it came from and it does seem a bit odd.

It's a Japanese typesetting unit apparently in common use. (I got
curious too so I found
https://lists.w3.org/Archives/Public/www-style/2013Nov/0302.html.)


--
https://annevankesteren.nl/

PhistucK

unread,
Aug 22, 2017, 12:51:43 PM8/22/17
to HwanSeung Lee, blink-dev, Eric Willigers, TAMURA, Kent
Can you make sure this is tested in web-platform-tests not only for the <img> case, but also generally in CSS?

Also, Edge seems to have implemented this for <img> (but not for the general CSS, at least as of Edge 15), see http://wpt.fyi/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html, press Control + F and type "1q", so it is a bit of a positive public signal. ;)
It would be great if you filed issues with the browsers that have not implemented it (for <img> or for the general CSS) yet.



PhistucK

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/ab865a05-37cb-48b4-9a68-62b096c9443d%40chromium.org.

Emil A Eklund

unread,
Aug 22, 2017, 12:56:53 PM8/22/17
to Anne van Kesteren, Aleks Totic, blink-dev, ericwi...@chromium.org, TAMURA, Kent
Thanks!

Philip Jägenstedt

unread,
Aug 23, 2017, 8:17:07 AM8/23/17
to PhistucK, HwanSeung Lee, blink-dev, Eric Willigers, TAMURA, Kent
On Tue, Aug 22, 2017 at 6:51 PM PhistucK <phis...@gmail.com> wrote:
Can you make sure this is tested in web-platform-tests not only for the <img> case, but also generally in CSS?

Yeah, the parse-a-sizes-attribute.html covers how the sizes attribute is parsed, defined in https://html.spec.whatwg.org/#parsing-a-sizes-attribute, and AFAICT not identical to any part of a regular CSS parser.

CSS test suites are a bit confusing, but tests for this should go in one of these places:

Not a fan of spec (or test) versioning, but since this was in Level 3, I'd put new tests for this in css-values-3.

Assuming that such tests are added (and parse-a-sizes-attribute.html is made to pass), LGTM1.

Jochen Eisinger

unread,
Aug 23, 2017, 10:33:44 AM8/23/17
to Philip Jägenstedt, PhistucK, HwanSeung Lee, blink-dev, Eric Willigers, TAMURA, Kent
lgtm2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Dimitri Glazkov

unread,
Aug 23, 2017, 10:46:37 AM8/23/17
to Jochen Eisinger, Philip Jägenstedt, PhistucK, HwanSeung Lee, blink-dev, Eric Willigers, TAMURA, Kent
Reply all
Reply to author
Forward
0 new messages