Re: Proposal of @ua

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 UTC