Troy,
on Friday, February 3, 2006 at 04:30 Troy Brophy wrote:
> Now, the wonderful thing about this app is that it has dozens of pages with
> unique designs. Each of these unique designs requires many elements to be
> positioned, floated, padded, margined, bordered or backgrounded uniquely.
> This has contributed in no small way to the 10,000+ lines of CSS rules for
> this app.
If you need more than 10,000 lines of css for styling an app, my first
guess is, that you've done something wrong. I spent the last year in
styling a large scale enterprise application framework and we only
needed about 2500 lines of multilined css definitions.
If you really need to style each page individually, you should
consider to split the rules into different css files.
I would start with:
general.layout.css
general.components.css
And two files for specific IE rules:
general.layout.ie.css
general.components.ie.css
and probably enhancing it with group levels:
groupx.layout.css
groupx.component.css
And two files for specific IE rules:
groupx.layout.ie.css
groupx.component.ie.css
if you need to go down to the page level you could use inline styles
in the head, but IMHO it's better to add them to the group level
files. Add an id to the body tag of the pages and identify the
specific page by using this id.
If you have too many rules, you can add page level external css-files.
You should also go through your style definitions to identify
duplications.
- Use inheritance as much as you can!
- Think about every class and id you use, if you really need it, or if
it will be enough to use the id/class of the container.
- Write the rules specifying as much as the html structure as
possible/necessary. This will help you to find a specific rule, if
you have to change it.
like:
#layoutWrapper #layoutHead #layoutLogo a img { styles... }
- Use namespaces for names of classes and ids
I hope that helps...
regards
Martin
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/