[thelist] hiding CSS

Erik Mattheis gozz at gozz.com
Mon Apr 15 00:59:01 CDT 2002


>in the former, you're assuming Lynx, and you may be generally correct -- the
>user doesn't care about layout within that context...  but if you don't assume
>Lynx, and assume some other browsers that may not have JS capability, but
>could read CSS (Amaya?), then you'd be incorrect...

[...]

>anyway, i'm just assuming i've misinterpreted you, because your assertion
>sounds all wrong to me...

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.

>  > 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*).

>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.

>  > 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.
--

__________________________________________
- Erik Mattheis

(612) 377 2272
http://goZz.com/

__________________________________________



More information about the thelist mailing list