Any Limits On Amount Of Code?

Discussion in 'CSS' started by gobbly2100, Aug 29, 2007.

  1. #1
    Hey there,

    I was just wondering if there is any sort of limit of what is advised in a CSS documanet?

    For example if I had 10,000 lines of CSS code surly that is not good but is there any kind of limit to try and stick to?
     
    gobbly2100, Aug 29, 2007 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Keep it as small as possible, just like with your HTML.

    If you can properly structure your HTML code to separate the header, menu, content, sidebar(s) and footer, then use the universal selector in your stylesheet to kill all the default margins and padding on your HTML elements, avoid using absolute positioning and hacks for your layouts, you should be fine.

    Especially if your stylesheet (once you start styling selectors with IDs or classes) starts following the HTML source code order.
     
    Dan Schulz, Aug 29, 2007 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    There is no physical limit to the filesizes, but I really cannot concieve of ANY layout that should need more than an initial 5k, and an addition 3k per sub page to the screen.css

    The largest CSS I've ever had to use for a site was 20K - if you are at 10K-locs (10,000 lines of code) you are pushing 150k of css easily - good god what are you even doing? I get squirrelly at about a tenth that.
     
    deathshadow, Aug 29, 2007 IP