Re: [WSG] Re: uppercase CSS and XHTML
Designer wrote: Lachlan Hunt wrote: Designer wrote: Incidentally, I would be interested in any browsers you know which won't support application/xhtml+xml, apart from IE of course. http://www.w3.org/People/mimasa/test/xhtml/media-types/results Thanks, Lachlan. I studied the list, and the only failing browsers I saw were Opera prior to v7.10 (in some versions the type selector in style sheets matched case-insensitively) Amaya (well surely Amaya users are the type to upgrade to later versions, which are OK) and iCAB, the latter's only problem being the style sheet case mentioned above. So, as far as I can see, if you have all your style sheets in lower case, the only problem is IE. If so, the selective feeding to IE should be fine. Does anyone know why this wouldn't be the case? If not, is this a new 'hack'? No, because of the case sensitivity bug several browsers have (especially iCab) and the other reasons I mentioned before regarding browser Accept headers which would result in those browsers receiving HTML, not XHTML, and that would include users that have modified their browser's Accept header. A browser's Accept header and its support for XHTML cannot be used as an indication of its CSS abilities. In Firefox, this can be set with the pref network.http.accept.default and some users may have modified it to prefer HTML because of its inability to incrementally render XHTML. iCab's accept header by default contains this: text/html;q=0.9,application/xhtml+xml;q=0.7 Safari's accept header contains just */*. If you were using Apache Multiviews (which selects files based on the file extension and chooses the files alphabetically in the event that checking all other criteria didn't result in a single preference) then the .html file would be chosen over the .xhtml file. Simply changing the file extensions to put the XHTML file alphabetically before HTML is not an option because then IE users would also receive the XHTML file. Also keep in mind that that list is not a complete list of every browser, there may be others that don't support XHTML, do support stylesheets and are still in use by some people. -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
Re: [WSG] Re: uppercase CSS and XHTML
Lachlan Hunt wrote: Designer wrote: Incidentally, I would be interested in any browsers you know which won't support application/xhtml+xml, apart from IE of course. http://www.w3.org/People/mimasa/test/xhtml/media-types/results Thanks, Lachlan. I studied the list, and the only failing browsers I saw were Opera prior to v7.10 (in some versions the type selector in style sheets matched case-insensitively) Amaya (well surely Amaya users are the type to upgrade to later versions, which are OK) and iCAB, the latter's only problem being the style sheet case mentioned above. So, as far as I can see, if you have all your style sheets in lower case, the only problem is IE. If so, the selective feeding to IE should be fine. Does anyone know why this wouldn't be the case? If not, is this a new 'hack'? -- Best Regards, Bob McClelland Cornwall (UK) www.gwelanmor-internet.co.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
Re: [WSG] Re: uppercase CSS and XHTML
Designer wrote: Incidentally, I would be interested in any browsers you know which won't support application/xhtml+xml, apart from IE of course. http://www.w3.org/People/mimasa/test/xhtml/media-types/results -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
Re: [WSG] Re: uppercase CSS and XHTML
Jason Turnbull wrote: Try changing the last style too DIV#container Yup! Works fine now. Thanks (to both) for the clarification. http://www.rhh.myzen.co.uk/rhh/gam/altgam/standards.php Incidentally, I would be interested in any browsers you know which won't support application/xhtml+xml, apart from IE of course. Or, more to the point, any that are (or could be) really relevant? Many thanks Best Regards, Bob McClelland Cornwall (UK) www.gwelanmor-internet.co.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
RE: [WSG] Re: uppercase CSS and XHTML
Lachlan Hunt wrote: > > No, it will not work under XHTML at all. The DOCTYPE is irrelevant, > > XHTML is case sensitive and uppercase element selectors will not match > > anything in XHTML. It will only work for text/html. Designer wrote: > OH Dear, I'm getting confused again! > > When I read the above, I thought "ah - here's a fine way to feed IE only > stuff perhaps", so I did a simple experiment using the php generated > headers trick mentioned by joshua [2]. I put the CSS as: > > > #container {width : 400px; margin : 0 auto;} > #content {padding : 25px} > #CONTAINER {WIDTH : 700PX;} > Notice Lachlan was referring uppercase *element* selectors (or type selectors in his previous post) Try changing the last style too DIV#container Regards Jason ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
Re: [WSG] Re: uppercase CSS and XHTML
Designer wrote: Lachlan Hunt wrote: No, it will not work under XHTML at all. The DOCTYPE is irrelevant, XHTML is case sensitive and uppercase element selectors will not match anything in XHTML. It will only work for text/html. OH Dear, I'm getting confused again! When I read the above, I thought "ah - here's a fine way to feed IE only stuff perhaps", That's a bad idea because IE is not the only browser that doesn't support application/xhtml+xml and some browsers actually prefer text/html according to their Accept headers. So if your content negotiation was done correctly, such browsers would also get the text/html variant and, thus, your IE only styles. so I did a simple experiment using the php generated headers trick mentioned by joshua [2]. I put the CSS as: #container {width : 400px; margin : 0 auto;} #content {padding : 25px} #CONTAINER {WIDTH : 700PX;} Those are ID selectors, not type (or element) selectors. See my previous post for a discussion of why that doesn't match. If you did want to use this technique, though I don't recommend it, you could use this instead: #container { /* (X)HTML styles */ } HTML #container { /* text/html only styles */ } Note: that won't work if your non-conformant XHTML root element is: http://www.w3.org/1999/xhtml";> ... -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
Re: [WSG] Re: uppercase CSS and XHTML
Lachlan Hunt wrote: No, it will not work under XHTML at all. The DOCTYPE is irrelevant, XHTML is case sensitive and uppercase element selectors will not match anything in XHTML. It will only work for text/html. OH Dear, I'm getting confused again! When I read the above, I thought "ah - here's a fine way to feed IE only stuff perhaps", so I did a simple experiment using the php generated headers trick mentioned by joshua [2]. I put the CSS as: #container {width : 400px; margin : 0 auto;} #content {padding : 25px} #CONTAINER {WIDTH : 700PX;} thinking that browsers with the correct mimetype would ignore the second (uppercase) container line, whereas IE (since it serves as text/html) would use the last line and over-ride the earlier 400px statement. So I browsed it in firefox, it validates and says it's the correct mimetype, and ignores the last line. Great! However, when I browsed it in IE6 it correctly served html4.01 - but still ignored the last line! What am I doing wrong? The file can be seen at [1] [1] http://www.rhh.myzen.co.uk/rhh/gam/altgam/standards.php [2] http://www.workingwith.me.uk/articles/scripting/mimetypes -- Best Regards, Bob McClelland Cornwall (UK) www.gwelanmor-internet.co.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **