diff --git a/.claude/rules/formats/sass-theming.md b/.claude/rules/formats/sass-theming.md index 99f421dc77..a156966942 100644 --- a/.claude/rules/formats/sass-theming.md +++ b/.claude/rules/formats/sass-theming.md @@ -6,6 +6,7 @@ paths: - "src/format/reveal/format-reveal-theme*" - "src/format/dashboard/format-dashboard-shared*" - "src/resources/formats/**/*.scss" + - "src/resources/projects/**/*.scss" --- # Sass Theming @@ -22,3 +23,30 @@ background-color: var(--r-background-color, $body-bg); Read `llm-docs/sass-theming-architecture.md` for full compilation pipeline details. For the three-tier callout CSS architecture (Bootstrap, RevealJS, standalone HTML), see `llm-docs/callout-styling-html.md`. + +## Focus indicators + +Never author a focus ring. The browser's own ring adapts to the platform accent +color, to the user's accessibility settings, and to forced-colors mode, where +`box-shadow` is dropped entirely. An authored ring does none of that, and a +second convention next to the first is visible as an inconsistency when a user +tabs through a page. + +So the only focus rules Quarto writes are ones that undo a vendor rule which +suppressed the browser ring: + +```scss +// a bare .btn: Bootstrap's .btn:focus-visible sets outline: 0 +.code-tools-button:focus-visible { + outline: revert; +} +``` + +A bare `