Everytime I see DRY mentioned, I die a little. Most of the time, it’s used wrong. DRY is not at all about not writing a string of characters twice. The original definition is:
“Every piece of knowledge must have a single, unambiguous, authoritative representation within a system”
Especially “buttons are round” and “buttons are blue, unless otherwise stated” can perfectly well be implemented using to seperate CSS statements under DRY. They are seperate information. Their target being the same is a sideshow. Applying DRY properly requires a systems view and can rarely be decided by looking at syntax.
In the Ruby community, I had far too many discussions about whether
attr_accessor :foo, :bar, :batz
is DRYer then
It’s completely irrelevant, both encode the same thing, from a systems view.
Quite right. And there’s nothing more annoying than well-meaning people who, in an attempt to make things DRYer, have to come up with awkward gymnastics in their code to prevent a few lines from looking the same at the cost of debuggability and maintenance.
So css gzips pretty well… it,s a feature.
That’s the first thing I thought too. The only other reason CSS would need to be small is maintainability, but since CSS is a hack to begin with, it’s not really worth maintaining when it works well enough with bits of duplicated CSS scattered about.
Previous submission: https://lobste.rs/s/g6lky3/70_repetition_style_sheets_data_on_how_we