Focus Style Regression Guard
Parses bounded CSS rule blocks and rejects net-new focus selectors that disable outlines without a visible outline, shadow, border, text-decoration, background, or filter replacement.
Runs on
Scope
$npx @youdede/toolkit add focus-style-regression-guard --target claude-code
What it does
Block newly invisible CSS focus states that have no visible replacement.
When it fires
- implementation
- pre-commit
How it behaves
Block newly invisible CSS focus states that have no visible replacement.
It does not evaluate rendered contrast or pixel visibility.
It does not reject outline removal when the same focus rule, or a `:focus-visible` rule for the same subject element, supplies a visible replacement.
It does not claim keyboard accessibility conformance.
Configuration
targets/claude-code/focus-style-regression-guard.mjs
- Version
- 1.3.0
- Requires
- node
- Licence
- RiskThis automatic gate blocks newly invisible CSS focus states that have no visible replacement; a false denial can interrupt legitimate work, but it does not execute the blocked action.
- Medium
- ModeHow it works: fixed rules, model instructions, or both.
- Deterministic only
- Behaviour
- Enforces, blocks on violation
- On failure
- Denies and blocks
- LatencyThe entrypoint handles one intercepted event to block newly invisible CSS focus states that have no visible replacement without deferred work.
- Immediate
- Data retentionWhether data remains after use and who manages its storage.
- Not retained
- In packs
- Accessibility assurance
Often used with
All in Design