The comment said bundle page only. It had been sitewide for a year
Date
26 Aug 2026
Category
Gotcha
Platform
Shopify
A full-bleed band on a product page was running wider than the page and adding a sliver of horizontal scroll. On some machines. The kind of bug that gets reported, cannot be reproduced, and gets closed.
What we found
It reproduced on browsers that show a classic scrollbar and not on browsers that overlay one, which is the tell for a hundred-percent-viewport-width element. A section built to break out of the content column is measured against the viewport, and the viewport includes the scrollbar. Themes normally absorb this with a clip on the page root, and this theme had exactly that rule, correctly written.
It was being overridden. Four declarations in a bundled stylesheet reset overflow, transform and containment to their defaults, with an exclamation mark on each, on the page root, the body, the content wrapper and every section on the page. Above them was a comment, in another language, saying to use this on the bundle page only.
They had been pasted into the theme editor in September last year and shipped in a file that loads on every page of the store. The comment described the intent perfectly. Nothing in the platform enforces intent: a stylesheet is loaded or it is not.
The interesting part is what it explained. The theme’s own horizontal scroll guard had been dead for eleven months, so every full-bleed element on the store was free to widen the page. A separate bug we had already recorded, where a marquee’s plain overflow rule computed as visible for no apparent reason, was the same override. We had the symptom written down and not the cause.
The find came from asking the browser directly which rules matched the element and which one won, rather than reading stylesheets and reasoning about it. Walking the CSS by hand had missed it twice.
What we did
Scoped the page structure part of the reset to pages that actually contain the bundle builder, and left the rules aimed at the bundle app’s own elements global, since those are harmless anywhere.
Then checked it properly, because loosening a rule that has been in place for a year can only be verified by comparison. We loaded ten pages at two widths each, twice: once as served, once with the previous version of the stylesheet substituted in, and compared every element the reset had touched. Every difference was the intended restore. A known sideways scroll on tablet widths turned out to be fixed as a side effect.
What to take from it
Anything pasted into the theme editor is global unless you personally made it otherwise. A comment is documentation, not a scope, and the person reading it a year later is the one who inherits the problem.
If a rule in your theme “isn’t applying”, stop reading the stylesheet and ask the browser which rules matched and which won. It gives you the answer in one step, including the override you did not know existed, and it is the difference between a fix and a workaround.