W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: Proposal of @ua

From: Brad Kemper <brkemper@comcast.net>
Date: Fri, 23 Nov 2007 11:08:54 -0800
Message-Id: <14CDE161-3F03-445B-B916-B57264E3D134@comcast.net>
Cc: Pascal Germroth <pascal@germroth.name>, Rijk van Geijtenbeek <rijk@opera.com>, WWW Style <www-style@w3.org>
To: jesse@dutchmoney.com


On Nov 23, 2007, at 6:33 AM, jesse von doom wrote:

>
> Pascal Germroth wrote:
>> jesse von doom wrote:
>>> I know that a browser could lie in its response
>> But why should it? I don't think that the marketing team of any
>> browser-creator would dig that deep into the technology layer...
>
> That's my point exactly, and I couldn't agree more. Reporting  
> features honestly benefits the browser-maker, so I doubt you'd see  
> many false positives. Whereas we already see false positives in  
> user-agent queries because people carelessly detect for one agent  
> over another in an exclusionary manner.
>
>

The problem on this is not that browser-makers lie about their  
features, it is about different implementations of the features. For  
instance, IE would say that it supports overflow, floats, and line- 
height but it does not do so in the same way as the others.

So, if I tried something like this to overcome the differences in  
height height rendering, and to try to prevent the descenders of the  
text from being clipped in IE, something like this would fail:

a.button {
     display:-moz-inline-box;
     display:inline-block;
     vertical-align: middle;
     font-size:13px;
     background-color: #ccc
     border:#900 solid 1px;

     line-height:15px !alt(0);
     padding:3px 9px !alt(0);
     margin-top:0px !alt(0);

     line-height:16px !alt(1);
     padding:1px 9px 4px 9px !alt(1);
     margin-top:-1px;
}

It wouldn't work, even if IE supported !alt, because that browser  
(which chops off the descenders if the line-height is too small, and  
then puts the text in a different position anyway) would just render  
the first set and not the second. In addition, I would have to  
precede those !alt styles with ones without any !alt, in order to  
have something for browsers that didn't didn't yet support !alt.

Whereas the following does work to yield fairly consistent results,  
for the time being:

a.button  {
     display:-moz-inline-box;
     display:inline-block;
     vertical-align: middle;
     font-size:13px;
     background-color: #ccc;
     border:#900 solid 1px;

     /* For Trident: */
     line-height:16px;
     padding:1px 9px 4px 9px;
     margin-top:-1px;
}

/* For everyone else: */
html>/**/body a.button  {
     line-height:15px;
     padding:3px 9px;
     margin-top:0px;
}
Received on Friday, 23 November 2007 19:09:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT