3 ms·
Why would you want to break it up?
by youngtaff 14y ago
Why would you want to break it up?
- csswizardry 14y agoFor a framework it might be a nicer option, so that you can drop a module by only deleting the include reference rather than permanently deleting dozens of lines. Perhaps. It’s largely down to taste I imagine :)
- jeremyworboys 14y agoI recently used a bastardisation of v3 and v4 (I was using v3 then you released v4) and I split each object into separate files and left the imports commented out in the main.scss file. I then uncommented each object as I used it so I didn't reach the end of the project with unused objects in the CSS and not being able to remember whether or not I had actually used them. I did a similar thing with the grid module: commented out all sizes and uncommented what I used as I went.
- lucisferre 14y agoAs far as I'm concerned CSS is no different than any other code and should be separated into modules so it's easier to read and understand. This is especially true if you're using something like SCSS. This SMACSS book recommends this and frameworks like Bootstrap and Foundation pretty much follow that approach.