Maka's frontend styling combines Tailwind v4 with handwritten renderer CSS. Some renderer surfaces still override shared @maka/ui primitives, so cascade order is an explicit contract rather than an implementation detail.
apps/desktop/src/renderer/styles.css is an entry file only.@import, @source, @theme, and other top-level orchestration statements.apps/desktop/src/renderer/styles/**/*.css.maka-tokens.css and reference-shell.css are transitional exceptions. Do not add new surface rules to them.@maka/ui selectors use the kebab-case .maka-* dialect.styles/settings/** surface uses camelCase .settings* selectors. Keep that dialect for settings-local selectors instead of mixing both forms within one surface.@layer base or @layer components where practical.@import "./file.css" layer(components) only when the build chain explicitly supports it.@import inside an @layer block.@layer components until the primitive seam is fixed.These selectors currently depend on appearing after Tailwind utilities and must remain unlayered:
.maka-nav-rowhtml[data-os="darwin"] .maka-nav-row.settingsHealthRefresh.settingsPermissionRefresh.settingsBotList buttonThe guard lives in apps/desktop/src/main/__tests__/renderer-style-layer-cascade-contract.test.ts. Update that contract in the same PR if the underlying primitive changes.
!important!important is allowed by default only for accessibility helpers such as .maka-visually-hidden, and for reduced-motion or e2e-fixture overrides.Justified: comment and an entry in renderer-important-audit-contract.test.ts.apps/desktop/src/renderer/maka-tokens.css./* local: ... */ comment.scripts/check-dead-css.mjs scans apps/desktop/src/renderer/styles/**/*.css and apps/desktop/src/renderer/reference-shell.css.scripts/check-dead-css-baseline.json only after review confirms the class-count change.css-test-helpers.ts or contract-css-helpers.ts.styles.css when the assertion concerns effective rules.styles.css only to enforce its entry-file contract.When changing renderer CSS:
styles.css into surface files.!important only after primitive and layer ownership is stable.Button, Textarea, and EmptyState overrides at the component API seam instead of accumulating renderer specificity.