[thelist] hiding CSS

aardvark roselli at earthlink.net
Mon Apr 15 07:16:01 CDT 2002


> From: Erik Mattheis <gozz at gozz.com>
[...]
> I think the misinterpretation might be that I'm thinking of styles
> like:
>
> position: fixed -> between the platforms and browser brands that
> support" it, there is a huge difference in how it changes the
> interpretation of left,top,right,bottom
>
> and
>
> many styles when applied to certain form elements -> render
> completely different in IE Mac and IE Win and NN 6
>
> In these examples, there's no @import fix.

yes, given that, i see where you are coming from... however, i don't rely on
that kind of stuff working exactly the same between browsers, so i'm not
automatically cutting out browsers just because of that stuff...

> >  > So what's wrong with not showing them styles? Certainly you're
> >  > not advocating a site that requires CSS ...  that would be unlike
> >  > you!
> >
> >what's wrong with not showing them styles is that there's no reason
> >*not* to...
>
> Certainly there is: If the browser attempts to render the style but
> gets it screwed up in a manner that's not acceptable, you might want
> to hide the style - or better (drumroll...) use JavaScript to serve
> that browser a stylesheet that works (*rimshot*).

in the case of styles that are buggy, sure, but what about type and colors?
what about developers who've built CSS that actually *works*? or something
like evolt.org, where the CSS is just style on top of a tabled layout?

> >conversely, if i were to 'disable' CSS, should JS also go with it?
> >should they be inextricably linked?
>
> In some cases, actually, yes ... it might be more compatible to hide
> CSS altogether for some browsers when doing DHTML ... or at least the
> style definitions involved in the DHTML.

at that point, the lack of JS would, by its very nature, prevent the styles
defined in the DHTML from working... i'm not talking dynamic here...

> >  > a. use a combination of JavaScript and @import
> >>  b. require JavaScript
> >>  c. Forget about what you were trying to do
> >
> >i'd go with (c) before i even hack the @import syntax, but i try to
> >be a purist, so that's a given...
> >
> >and by (c), i think we both mean try to find another way to do it...
> >failing that, gut it...
>
> Right, we both understand (c) to mean examining another approach, but
> if there's no other approach, we would seem to disagree:
>
> If given the choice between
>
> 1. Showing something incredibly bad or unusable to perfectly good
> browsers like IE 5 Mac and Opera 6 2. Showing no styles to browsers
> where someone has fiddled with the preferences
>
> I'd say, "tough luck" to those without JS.

not quite my approach... i try not to create or use styles that will break a
browser anyway, as opposed to unstyling it all...

as for fiddling with preferences, i consider font size and resolution
adjustments to also be fiddling with preferences, and my CSS accomodates
those users...




More information about the thelist mailing list