The CSS that looked dead but wasn't
Date
31 Jul 2026
Category
Gotcha
Platform
Shopify
Tidying a theme mid-rebuild, we found six styling rules in the footer that appeared to reference nothing. Reading the code supported deleting them, and every developer knows the itch to remove dead weight while passing through. So we deleted them, and because deletions get the same verification as additions here, we rendered the footer before and after at desktop and phone widths and compared the images pixel for pixel.
What we found
Desktop was identical. Phone was not. Two of the six rules were quietly holding the mobile footer’s text left-aligned, overriding a theme behaviour that centres footer content at small widths. Nothing referenced them in any obvious way, and nothing about their names suggested phones. They looked exactly as dead as the other four, and reading the code a second time would not have changed the verdict.
The two rules went back in, this time with comments explaining what they hold up. The final footer measured byte-identical to where it started at both widths, with four genuinely dead rules gone.
What to take from it
Reading code tells you what a rule says, not what removing it does. In a theme of any age there are rules whose entire job is countering another rule you have not read, and the only honest test of a deletion is rendering the affected pages before and after, at more than one width, and comparing the output rather than eyeballing it. If a cleanup lands on your store and the desktop looked fine in review, phone width is where to check, because that is where the quiet dependencies live.