[cfe-dev] patch for auto show/hide macro expansion in CSS

Oliver Hunt oliver at apple.com
Thu Apr 17 19:17:23 PDT 2008


XHTML doctypes are a very fast way to trigger quirks mode in those  
browser that recognise xhtml (ie. not IE which will
treat the doctype as nonsense and go into quirks mode anyway)

Despite what the XHTML spec may say, xhtml served with a text/html  
mimetype (needed for IE to even attempt
to display the content) will be treated as html with a bogus doctype  
-- eg. straight into quirks mode.
For a local file to be detected as xhtml you'll need a .xhtml  
extension (depending on platform and browser).

In general the HTML5 doctype will trigger standards mode in most  
browsers (Firefox, IE, Opera, and anything
WebKit based) and that's very simple:
<!doctype html>

--Oliver

On Apr 17, 2008, at 7:06 PM, Ted Kremenek wrote:

> I think the goal is to be portable with the latest, standard browsers,
> while still using the features of certain browsers if it makes life
> easier and the results prettier (e.g., using the -webkit-*  CSS
> properties for Safari).  If HTML4 is more current, than that's
> probably what we should use, but I am not the expert here.  Anyone who
> knows better on how the HTML should be formatted is more than welcome
> to submit a patch.
>
> On Apr 17, 2008, at 4:25 PM, Nico Weber wrote:
>
>> Hi,
>>
>>> I put an XHTML doctype in order to get the browser to be in standard
>>> mode
>>> (instead of quirk mode).
>>
>> I had the impression that XHTML is so 2006 and everyone is using  
>> HTML4
>> these days:
>>
>> http://hixie.ch/advocacy/xhtml
>>
>> Main reasons are that Mozilla doesn't (didn't?) render XHTML pages
>> progressively, and that next to no server serves XHTML files as
>> application/xml+xhtml, so they trigger quirks mode.
>>
>> I might be wrong though.
>>
>> Nico
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list