This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > July 2007 > Characters "/*/*/" in CSS? Is it another browser sniffer?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Characters "/*/*/" in CSS? Is it another browser sniffer?
|
|
| Andy Dingley 2007-07-16, 6:19 pm |
| Another thread
<http://groups.google.co.uk/group/alt.www.webmaster/msg/
e7d125cdff1ae2a2>
linked to an accessibility checker at this site
<http://wave.webaim.org/index.jsp>
In their own (unimpressive) code I saw lots of inlined CSS, all
beginning with the sequence "/*/*/"
<div style="/*/*/background-color:#990000;">
<h1 style="/*/*/text-align:center;margin:
0px;color:#ffffff;">WAVE 3.0 Accessibility Tool</h1>
</div>
Now what's this about? Is it some sort of dodgy-browser escaping that
exploits an obscure CSS parser bug? It's a new one on me if it is.
Crazy CMS output? Or just clueless coders?
| |
|
| On 2007-07-16, Andy Dingley <dingbat@codesmiths.com> wrote:
> Another thread
><http://groups.google.co.uk/group/alt.www.webmaster/msg/
> e7d125cdff1ae2a2>
> linked to an accessibility checker at this site
><http://wave.webaim.org/index.jsp>
>
> In their own (unimpressive) code I saw lots of inlined CSS, all
> beginning with the sequence "/*/*/"
>
> <div style="/*/*/background-color:#990000;">
> <h1 style="/*/*/text-align:center;margin:
> 0px;color:#ffffff;">WAVE 3.0 Accessibility Tool</h1>
> </div>
>
> Now what's this about? Is it some sort of dodgy-browser escaping that
> exploits an obscure CSS parser bug? It's a new one on me if it is.
> Crazy CMS output? Or just clueless coders?
I've seen something similar in the styles of http://www.python.org before.
It's still there, here it is:
#left-hand-navigation
{
/*/*//*/
position:absolute;
left:5px;
top:10em;
z-index:1;
font-family: Arial, Helvetica, sans-serif;
font-size:0.75em;
/* */
}
I think the idea is that everything in that selector block should be
considered commented out, but NS4 treats the first and last lines as
complete comments so you get the properties.
If you understand leaning-toothpick, this is what browsers are supposed
to do:
\/\*[^*]*\*+([^/*][^*]*\*+)*\/ /* ignore comments */
{s}+\/\*[^*]*\*+([^/*][^*]*\*+)*\/ {unput(’ ’); /*replace by space*/}
| |
| Bergamot 2007-07-16, 6:19 pm |
| Andy Dingley wrote:
>
> <div style="/*/*/background-color:#990000;">
>
> Now what's this about? Is it some sort of dodgy-browser escaping
http://centricle.com/ref/css/filters/
--
Berg
| |
| Wes Groleau 2007-07-16, 10:17 pm |
| Andy Dingley wrote:
> In their own (unimpressive) code I saw lots of inlined CSS, all
> beginning with the sequence "/*/*/"
> <div style="/*/*/background-color:#990000;">
> <h1 style="/*/*/text-align:center;margin:
> 0px;color:#ffffff;">WAVE 3.0 Accessibility Tool</h1>
> </div>
I can't remember the details, but I read somewhere about
how different browsers parse comments. I think some treat
the above as two comment openers and then a slash, then
some text, and then a slash and the closing of two nested comments.
Others (and I think this is by-the-book even though it makes
life difficult for coders) interpret it as
one opening comment, a slash, one comment-closer, some
UNcommented text, then comment-opener, slash, comment-closer
> Now what's this about? Is it some sort of dodgy-browser escaping that
> exploits an obscure CSS parser bug? It's a new one on me if it is.
> Crazy CMS output? Or just clueless coders?
I'd be wary of anyone that claims to really understand accessibility
and yet makes it S.O.P. to bury CSS inside of HTML tags.
--
Wes Groleau
Can we afford to be relevant?
http://www.cetesol.org/stevick.html
| |
| Felix Miata 2007-07-17, 3:17 am |
| On 2007/07/16 06:59 (GMT-0700) Andy Dingley apparently typed:
> Another thread linked to an accessibility checker at this site
> <http://wave.webaim.org/index.jsp>
> In their own (unimpressive) code I saw lots of inlined CSS, all
> beginning with the sequence "/*/*/"
> <div style="/*/*/background-color:#990000;">
> <h1 style="/*/*/text-align:center;margin:
> 0px;color:#ffffff;">WAVE 3.0 Accessibility Tool</h1>
> </div>
> Now what's this about? Is it some sort of dodgy-browser escaping that
> exploits an obscure CSS parser bug? It's a new one on me if it is.
> Crazy CMS output? Or just clueless coders?
Looks directed at NN4: http://css-discuss.incutio.com/?page=CaioHack
--
"All scripture is God-breathed and is useful for teaching,
rebuking, correcting, and training in righteoousness."
2 Timothy 3:16 NIV
Team OS/2 ** Reg. Linux User #211409
Felix Miata *** http://mrmazda.no-ip.com/
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|