Re: User Agents Do Not Implement Absolute Length Units, Places Responsive Design in Jeopardy

Thinking about the problem some more, I don't think there is any reason why
the author can't or shouldn't be given the choice to decide whether to use a
device vendor's recommendation for the definition of 1 inch.

3 means of defining an inch have have been discussed:

1. Pixel-ratio (almost always 96 px/in)

2. Actual (1 in/in)

3. Hardware Vendor Defined (X px/in)

#1 is necessary for backwards compatibility, and it's also the current
status quo.  #2 serves a tremendous number of use cases, and #3 offers some
very interesting opportunities for adaptation.

The following statement would be effective at the stylesheet or <style>
level, applying to all rules within the context it is included.  An optional
'selector' argument addresses the inline styles problem, by allowing the
author to extend their desired definition for 1 inch to the style attribute
of the encompassed elements.

@physical-units [pixel | actual | device] [(selector)]

@physical-units actual ( section > ul, span ); /* Applies 1 in/in unit
definition to all rules in the stylesheet, as well as the style attribute of
some ul elements and all span elements */

-Brian

Received on Thursday, 27 October 2011 15:56:21 UTC