SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css code modularity

    I wanted to know from some people if you have all of your css code in one large file, or if you use several small files with different css in them.

    As an example you could have one large css file with font, formatting, color, layout or you could have a css file for each different category. One for color, one for layout, one for fonts. This would be categorical modularity.

    Another kind would be structural modularity. In this kind you would have a different css file for layout, articles, forums, error pages, etc. The layout would contain formatting, color for the whole site. It would be imported into each page. The other css files, articles, forums, error, etc, would contain formatting specific to the type of page it is link to.


    Is there a benefit to having one css file over using many small ones? What method do you use, and why?

    One of the things I am trying to do is to speed up my site. Which method do think would result in the best speed increase.

    Thanks //Ukiah Smith

  2. #2
    Back in Action Winged Spider's Avatar
    Join Date
    Jun 2001
    Location
    outside my mind
    Posts
    900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've done this before, and still do it now.

    One file descibes how everything is laid out and another include colors it. That include is also broken up into fonts, html, classes, ids, spans, and so forth. It makes finding something very easy and keeps the other less skilled developers I work with off the main layout code.

    You need to change a font size?
    /includes/font_colors.css

    what about a span?
    /includes/span_colors.css


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •