Re: [css-d] Would this be considered bad css form?

2006-01-11 Thread Roger Roelofs
Michael,

On Jan 11, 2006, at 1:00 PM, Michael Soultanian wrote:

 2.  Instead of doing stylesheet switching, the other thing
 I was thinking of was putting all my styles in one
 stylesheet and just change the class of an outer tag (i.e.
 body) to something like the following depending on what
 page you're on:

 body class=welcome
 or
 body class=abouthome
 or
 body class=newsfaculty

 and then I would write styles accordingly:

 .about {font:arial;}
 .abouthome .column1{float:left;color:blue;}
 .newsfaculty .column1{float:right;color:red;}

 The advantage of method 2 is that everything could be put
 in one stylesheet

It is a personal preference thing.  I prefer option 2 with an ID on  
the body element.  I've used section specific stylesheets before, but  
in my case it didn't work real well because our developers started  
copy and pasting common stuff into multiple sections.  I prefer 1 (or  
a few) well commented sheets.  Option 2 can be more efficient for the  
client because it caches well and lowers the number of requests the  
browser has to make.


Roger,
-- 
Roger Roelofs
[EMAIL PROTECTED]



__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Would this be considered bad css form?

2006-01-11 Thread Mike Soultanian

Roger Roelofs wrote:
 2.  Instead of doing stylesheet switching, the other thing
 I was thinking of was putting all my styles in one
 stylesheet and just change the class of an outer tag (i.e.
 
 It is a personal preference thing.  I prefer option 2 with an ID on the 
 body element.  I've used section specific stylesheets before, but in my 
 case it didn't work real well because our developers started copy and 
 pasting common stuff into multiple sections.  I prefer 1 (or a few) well 
 commented sheets.  Option 2 can be more efficient for the client because 
 it caches well and lowers the number of requests the browser has to make.
 
Hey Roger,
That is exactly what I was thinking regarding multiple stylesheets and 
stuff getting cut and pasted all over the place.  Granted, there would 
be some of that within that one stylesheet, but it's still much easier 
to manage.  Plus, like you said, I can put some good commenting in there 
to let any other developers know what is happening if they see it for 
the first time.

I like the benefit of the caching, as well.

Thanks for the info.  This was exactly what I was looking for!

Mike
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Would this be considered bad css form?

2006-01-11 Thread Peach Lynda L CTR USAF 96 CG/SCTA
Re: 

 2.  Instead of doing stylesheet switching, the other thing I was thinking
of was 
putting all my styles in one stylesheet and just change the class of an
outer (i.e. body) to something like the following depending on what page
you're on:

body class=welcome
or
body class=abouthome
or
body class=newsfaculty

and then I would write styles accordingly:

.about {font:arial;}
.abouthome .column1{float:left;color:blue;} .newsfaculty
.column1{float:right;color:red;}

The advantage of method 2 is that everything could be put in one stylesheet
so I'm not trying to manage a bunch of different sheets. ...

Ultimately, I'm curious if anybody has used method 2 or would it be
considered bad form?  I'm trying to see if there are any major problems
associated with that method before I go and use it.


We have implemented, and successfully across multiple sites that have the
same look and feel something like the above.

There is one overriding style sheet -- let's call it main.css.
Then there is a color.css and a site.css always called in that order via an
@import.

Any change to main.css must work across ALL the sites. That means some of
the things in the main.css might not be used on a site. That's okay -- it is
there anyway.

The color.css governs ... Color. In other words, it the .hdr has a
background-color: #003366; in main.css but the color of site ABC is green,
then that particular element is defined again in color.css. The only things
in color.css are the elements that define color.

And site.css is for that specific site. Something that site needs that none
of the others do. Sometimes things from site work their way into main but
not often.

Yes -- you have to work carefully but the end result has been wonderful. I
help design and maintain quite a few sites -- yet my CORE remains constant.
So problems in display, etc. are more easily solved.

Whether #2 is better than #1, I don't know. But I can by experience say that
the method above will work well for you if you are maintain multiple sites
that must retain a similar look, feel, and navigation.

Also a benefit we didn't know when we started this method, it has naturally
implemented a process of change. In other words, things can't just be PUT
into main.css. It has to be carefully considered as to whether all the sites
can or could need this and would USE it the same way. Sometimes it takes a
bit longer to implement but again, the end result is goodness all the way
around.

An additional benefit is for the programmer developer. They can move from
one project to another and work the programming issues without worrying the
display issues. What works in one of these sites will work in the next.
When it doesn't -- that's when I get involved and additions are done in
site.css. Or on some occasions ... Yep, an error in main.css which got
rectified across all the sites.

My 2 cents -- FWIW.
Lynda Peach

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Would this be considered bad css form?

2006-01-11 Thread Mike Soultanian
Yeah.. we actually do something similar to what you were saying (we have 
globalstyles.css).  It's good to hear that people don't have problems 
with my method 2 because I am really liking it.  It seems like it has a 
bunch of benefits in the long-run.  I just wanted to make sure ahead of 
time that I wasn't going to be digging my own hole!!

Thanks!
Mike

Peach Lynda L CTR USAF 96 CG/SCTA wrote:

 Whether #2 is better than #1, I don't know. But I can by experience say 
 that the method above will work well for you if you are maintain 
 multiple sites that must retain a similar look, feel, and navigation.
 
 Also a benefit we didn't know when we started this method, it has 
 naturally implemented a process of change. In other words, things 
 can't just be PUT into main.css. It has to be carefully considered as to 
 whether all the sites can or could need this and would USE it the same 
 way. Sometimes it takes a bit longer to implement but again, the end 
 result is goodness all the way around.
 
 An additional benefit is for the programmer developer. They can move 
 from one project to another and work the programming issues without 
 worrying the display issues. What works in one of these sites will 
 work in the next. When it doesn't -- that's when I get involved and 
 additions are done in site.css. Or on some occasions ... Yep, an error 
 in main.css which got rectified across all the sites.
 
 My 2 cents -- FWIW.
 Lynda Peach
 
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/