Oh No! Our Stylesheet Only Grows and Grows and Grows! (The Append-Only Stylesheet Problem)

This is a real worry these days. I’ve heard it from lots of lots of developers. The years tick by on their projects, and all they ever seem to do is add to their CSS, never remove. It’s not just a feeling, I’ve talked with companies before that track hard data on this. Over five years of tracking the size of their stylesheet, and all it’s ever done is tick upwards in size.

This could be considered problematic for several reasons:

  • Files getting bigger is worse for performance
  • The developers are afraid of the CSS
  • #2 being, in my opinion, a much bigger deal than #1. The overall file size of CSS is likely to be fairly small compared to things like image assets and even the JavaScript payload these days. Fancy tooling and the world’s internet speed ever-lurching faster will probably make #1 not that big of a deal.

    But being afraid of your own styles is a bigger problem.

    “Afraid” isn’t usually how this problem is talked about, but I think that’s what it amounts to. It’s often talked about in terms of how the global nature of CSS is problematic or that the middle “S” in “CSS” is the only one worth saving.

    “Unusued CSS”

    Part of this story could certainly be about deleting CSS that is determined to be “unused” in a project. I know there is incredible demand for this kind of tooling. I feel like there are some developers damn near frothing at the mouth to blast their CSS through some kind of fancy tool to strip away anything unneeded.

    This worries me just a little bit. It feels like saying: “Yes, I am afraid of our stylesheets. I don’t want to understand them, I just want something to fix them for me.”

    Here’s how one company I heard from was doing …read more

    Via: Oh No! Our Stylesheet Only Grows and Grows and Grows! (The Append-Only Stylesheet Problem)


    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>