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/


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:


or

or


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

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 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:
>
> 
> or
> 
> or
> 
>
> 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/


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

2006-01-11 Thread Michael Soultanian

I am trying to figure out how I'm going to set up my style 
sheets.  My website consists of the following setup:

-welcome (site home page)
-about home
-about who's who
-news home
-news college
-news students
-news faculty
-faq home
...etc

Each section (home/about/news/faq) has different styling. 
 Within each section the color scheme stays the same, but 
the layout may change slightly within the section.

I am serving my pages out using Coldfusion so I can 
dynamically change things around.  I am considering the 
following options:

1.  Have multiple stylesheets for each section/page and 
then use Coldfusion to bring in different sheets when 
appropriate.  For that, I would have to make multiple 
stylesheets for each section/page and put the appropriate 
styles to format those areas.  So, I would have the 
following:

site.css (for the entire site)
about.css (for the entire about section)
abouthome.css (specific to the about home page)
aboutwhoswho.css (specific to the about who's who page)
news.css (for the entire news section)
newshome.css (specific to the news home page)
newscollege.css (specific to the news college page)

and so on.  site.css would only contain styles that are 
global throughout the entire site, each section stylesheet 
(about.css, news.css, etc) would only contain styles used 
within each section, and then any changes to specific 
pages would have their own stylesheet (abouthome.css, 
aboutwhoswho.css, etc).  Then, I would use coldfusion to 
update which stylesheet is used.  So, for the College News 
page it might look like the following in the source:





Like I mentioned above, I would only put appropriate 
styles in each sheet.  In other words, news.css is not 
going to have layout formatting because that is handled in 
newscollege.css (layout is specific to each page).

I know this is a bit cumbersome, but unfortunately the 
layout does change slightly from page to page.  I am going 
to try and stay away from overriding styles because that 
gets difficult to debug - unless absolutely necessary.


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:


or

or


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.  For some reason, however, this method 
doesn't sit that well.  I guess it's because if you look 
at the stylesheet and then at the source, you're going to 
see class names defined in the sheet that are not in the 
source until you actually navigate to that part of the 
site because the class names aren't hard-coded.

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.

Thanks!
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/