fix(tour): declare the backdrop's vendor prefix before its standard property - #28
Open
Gavriel-M wants to merge 1 commit into
Open
fix(tour): declare the backdrop's vendor prefix before its standard property#28Gavriel-M wants to merge 1 commit into
Gavriel-M wants to merge 1 commit into
Conversation
…roperty
`.tip-magic-tour-backdrop` wrote `backdrop-filter` first and
`-webkit-backdrop-filter` second. Nothing here shows the problem: this package
ships its CSS unminified, so both survive and every browser picks the one it
understands.
A consumer whose build minifies CSS is a different story. A minifier that folds
an alias and its standard property into one keeps the last one written, so that
order ships the ALIAS ALONE — and Chrome no longer recognises it
(`CSS.supports('-webkit-backdrop-filter', 'blur(4px)')` is false as of 152).
The rule then computes `backdrop-filter: none`: a tour backdrop that dims the
page but blurs nothing, which reads as broken rather than as a spotlight.
Found in a downstream app whose production bundle had exactly this, while dev
was correct. Swapping the two lines and rebuilding restores the standard
property in the minified output; reverting loses it again.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197yar67v2FaNevznSor91E
Gavriel-M
force-pushed
the
fix/prefixed-property-order
branch
from
August 31, 2026 13:48
4dd0c2c to
ba789e0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.tip-magic-tour-backdropdeclaresbackdrop-filterfirst and-webkit-backdrop-filtersecond. Swapping them fixes a bug that is invisible in this repo but breaks the tour backdrop in consumers.Why the order matters
This package ships its CSS unminified, so both declarations survive and every browser picks the one it understands — nothing here is wrong today.
A consumer whose build minifies CSS is a different story. A minifier that folds an alias and its standard property into one keeps the last one written, so this order ships the alias alone:
And Chrome no longer recognises that alias:
So the rule computes
backdrop-filter: none. The backdrop still dims the page —backgroundis a separate declaration — but blurs nothing behind it, which reads as a broken overlay rather than a spotlight.backdrop-filternoneblur(4px)How it was found
A downstream app shipped exactly this: correct in dev, wrong in production. Reordering the two lines in the installed package and rebuilding restored the standard property in the minified output; reverting lost it again — same build, same config, only the order changed.
user-selectin the same bundle keeps both forms, so this isn't a misconfigured minifier: it prefixes correctly when the source lets it.The change
Two lines swapped, plus a short comment saying why the order is load-bearing.
Scope
Two lines and a comment — no test. The guard I first considered would have been a bespoke CSS parser
policing a single occurrence: there is exactly one prefixed/standard pair in the codebase, and the other
-webkit-usages (-webkit-box/box-orient/line-clamp, and the::-webkit-scrollbarpseudo-elements) have no standard counterpart in play. If enforcement is ever wanted here, stylelint is
the right tool for it rather than something hand-rolled.
npm run validateis green: typecheck, lint, format check, 377 tests.🤖 Generated with Claude Code
https://claude.ai/code/session_0197yar67v2FaNevznSor91E