Re: Re: Good solution for managing stylesheets

Jeffrey Moss
Fri, 19 Aug 2005 23:29:47 -0000

I don''t see how this makes maintenance any easier. You still are
maintaining
multiple stylesheets, it''s just you don''t include them in the
templates you
include them in your global stylesheet, which IMO is a bigger pain, and
doesn''t afford you as much flexibility. Separating IE specific styles
into
their own stylesheet still requires that you dynamically output the
stylesheet name.

I think Michael was just talking about a speedy user experience, where he
does have a valid point, and I''ve thought about that before, I just
don''t
think it makes much difference usually, either way you go has tradeoffs.
I''m
more concerned with where I''m doing all my editing, so ideally i would
just
be able to embed the style in the HTML elements and have it all extracted
into an optimal set of stylesheets by factoring the commonalities on the
individual attribute level. THAT would be cool. HTMLTidy has a feature
that''s supposed to do this but last time I tried it, a few months ago,
it
savaged my pages.

-Jeff

----- Original Message -----
From: "Frank Manno"
<frankmanno-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
Sent: Friday, August 19, 2005 5:03 PM
Subject: Re: [Rails] Re: Good solution for managing stylesheets


> In this particular case I''m wondering if the effort is worth it.
You may
> get better results, all in all, if you put everything into one
> stylesheet. The consolidated stylesheet is probably bigger than any
> combination of stylesheets you would use on one page otherwise, but it
> has the advantage that it requires just one server hit.

I''m with Michael on this one... Except in my case, the use of a single
access point for the CSS is much easier to maintain.  What I usually
do is something like this:

Main CSS:
@import url("master.css");
@import url("ie_only.css");

The main CSS file takes care of importing the others, which allow me
to separate IE-specific styles into their own stylesheet.  You could
also have a stylesheet for forms, tables, etc.

Although these are separate stylesheets, you only need to link to your
main CSS file within the Rails code.  It''s much easier to maintain
this way.

Just my $0.02.

--
- Frank
FrankManno.com

<a
href="http://www.spreadfirefox.com/?q=affiliates&amp;id=2496&amp;t=1">Get
Firefox!
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org