W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [media-queries] chicken-egg problem with font-based lengths

From: Felix Miata <mrmazda@earthlink.net>
Date: Mon, 20 Aug 2012 13:10:57 -0400
Message-ID: <50326FA1.4020408@earthlink.net>
To: www-style@w3.org
On 2012/08/20 08:11 (GMT-0700) Tab Atkins Jr. composed:

> Felix Miata  wrote:

>>  On 2012/08/20 11:39 (GMT+0200) Simon Sapin composed:

>>>  A small note: you can use font-size: 16px instead of 12pt, they’re
>>>  always the same in CSS.

>>  That statement is misleading. Most modern browsers at default settings will
>>  render them the same, but most older ones will not, and Konqueror still
>>  holds true to making a pt display density dependent. This means if the DE is
>>  configured to accurately match display device density, a pt will in fact
>>  measure 1/72" at the device surface, regardless how many px it takes to
>>  render it. This is generally no longer possible in modern browsers. The
>>  other exception is the Geckos, which provide the mozmm unit. If you wish a
>>  12pt font from a Gecko, you get it by specifying font-size: 4.2333mozmm
>>  instead of or following font-size: 12pt or 16px.

> No, it's accurate.

It may be accurate according to specification theory, but the devices I'm 
looking at are real, not theoretical.

> The pt unit is defined as 4/3 of the px unit,
> which is defined as 1/96 of the in unit, regardless of user defaults

Which is inane.

> or anything else.  All modern browsers implement this, because it's
> required for web compatibility.

Compatibility with incompetent design.

>  Old or minority browsers may have
> different behavior, but that's always true.

> It appears that you are, in general, confused about what the px unit
> represents - it is *not* the same size as a device pixel, in general.

Yes it is the same, due to this gem from 

"...pixel unit refer to the whole number of device pixels that best 
approximates the reference pixel."

> Instead, it's defined in terms of visual angles, so that 1px will look

Technical definition doesn't matter. Reality does.

> like approximately the same length on any device.  Desktop browsers
> generally size the px unit to be an integer multiple of device pixels,

Precisely why I wrote what I wrote. Until device density reaches 192 DPI, a 
CSS pixel equals a device pixel, because browsers only use integer multiples. 
The consequence is users of devices in the 100-191 DPI range trying to use 
pages with text (and relevant images, and text containers) sized in px units 
are forced to use browser defense mechanisms against that offensive styling, 
even to the extent of disregarding all styles. The problem will be similar 
for devices in the 200-287 DPI range. Sizing text in px, and units tied to 
px, disregards user preferences, which is rude, and entirely unnecessary. 
Relative length units can get the job done without rudeness. For ordinary 
common web content, the specs should do everything they can to induce 
stylists to stick to relative units as much as is practical, meaning limiting 
use of the px to single digit values when applied to content other than 
bitmap images.
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

  Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
Received on Monday, 20 August 2012 17:11:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:03 UTC