style sheets
Unknown W. Brackets
unknown at simplemachines.org
Sun Jun 4 15:37:01 PDT 2006
Eric,
My day job is web development. I write HTML/CSS, and I do dynamic pages
as well in various languages (primarily Flash or JavaScript client side,
or PHP server side.) I'm not strong in Flash, but I'm pretty strong in
HTML, CSS, JavaScript, and PHP.
I work with this every day, and I never use CSS hacks. I'm consistently
able to write CSS and HTML that works in Mozilla 1.0, Internet Explorer
5.0, and Safari 1.3 (and usually Opera, but we don't officially support
that one.) It isn't hard, people just jump to wanting to use hacks too
quickly.
In fact, I used to support Opera and Internet Explorer 4.0 officially
when I worked freelance.
Anyway, as far as I remember, the CSS spec does not include // as a
comment, only /* */ multiline comments. If I am correct, this means
that Mozilla is doing the wrong thing here.
Please see for reference:
http://www.w3.org/TR/REC-CSS2/syndata.html#comments
Thus, if Mozilla were correctly patched to better follow the spec in
this case, it would break again. Better to fix it the right way.
Please do not take what I've said as condescending or snooty; I'll admit
it flares me up a tiny bit when people start using CSS hacks since it's
so easy not to, but understand that I wouldn't bother to say this if I
thought it was falling on deaf ears or if I had no respect for your opinion.
-[Unknown]
> In article <e5vkpt$2kf2$1 at digitaldaemon.com>, Unknown W. Brackets says...
>> CSS hacks are evil. They are worse than the C++ preprocessor because
>> they are undocumented.
>
> The problem you cite is due to the *exact* same phenomenon that web developers
> have to cope with. The more compilers/browsers you support, the more you have
> to dance around all the quirks and deviations from the specification.
> Unfortunately, the code that adheres to the strictest interpretation of any such
> supported standard will have the hardest time as they will have to bend over
> backwards avoiding all of these compatibility problems. Its possible, but not
> always practical.
>
> I agree that CSS hacks are a technique that should be avoided if possible. But
> a smart coder can always stack the rules such that they degrade *twoards*
> compliance. The hack I outlines does just this: if IE were patched to do the
> right thing, the page would still render correctly. :)
>
> - EricAnderton at yahoo
More information about the Digitalmars-d-announce
mailing list