css-theming
/css-theming
Buduje system tokenów z custom properties o poziomach prymitywnym i semantycznym, wspierający przełączanie motywów w czasie działania, przy tokenach projektowych i refaktoryzacji zahardkodowanych kolorów.
- Autor
- Amey-Thakur ↗
- Repozytorium
- AI-SKILLS ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 05.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 05.09.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Buduje system tokenów z custom properties o poziomach prymitywnym i semantycznym, wspierający przełączanie motywów w czasie działania, przy tokenach projektowych i refaktoryzacji zahardkodowanych kolorów.
Oryginalny opis (EN)
Build a custom-property token system with primitive and semantic tiers that supports runtime theme switching. Use when setting up design tokens, adding themes, or refactoring hardcoded colors.
Jak działa
- Method
- Boundaries
Podgląd SKILL.md
---
name: css-theming
description: Build a custom-property token system with primitive and semantic tiers that supports runtime theme switching. Use when setting up design tokens, adding themes, or refactoring hardcoded colors.
---
# CSS theming
A theme is a mapping from meaning to value. Components consume meaning
("surface", "accent"); themes redefine the values; nobody touches
component CSS to restyle the product.
## Method
1. **Two tiers of tokens.** Primitives name values
(`--blue-600: #2563eb`); semantics name roles
(`--color-accent: var(--blue-600)`). Components use only semantic
tokens. The primitive tier changes when the palette changes; the
semantic tier changes when design language changes; components change
for neither.
2. **Scope themes to an attribute on :root.**
`:root { ... }` holds the default;
`:root[data-theme="dark"] { --color-surface: ... }` overrides only
semantic values. Switching is one attribute flip, inheritable
everywhere, no class sprawl.
3. **Name by role, not appearance.** `--color-danger`, not `--color-red`:
the danger color may not be red in every theme. Scale names
(`--space-1..8`, `--text-sm/base/lg`) beat value names (`--space-4px`)
because the scale can be retuned.
4. **Keep the semantic set small and complete.** Surface, surface-raised,
border, text (2-3 strengths), accent, danger/success/warning, focus
ring. Every hardcoded hex in component CSS is a future theming bug;
lint for raw color values outside the token files.
5. **Respect the user first paint.** Apply the stored theme before CSS
loads (inline script setting `data-theme`), default from
`prefers-color-scheme`, and set the `color-scheme` property so form
controls and scrollbars match. A white flash before dark mode is a
token system applied too late.
6. **Derive sparingly with color functions.** `color-mix(in oklch, ...)`
and `oklch()` relative colors can generate hover states from base
tokens, cutting token count; keep derivations in the token layer so
components stay ignorant of the math.
## Boundaries
- Tokens do not enforce contrast; themes need their own accessibility
pass (see color-contrast).
- Per-component theme overrides (a dark card on a light page) work by
re-scoping the semantic tokens on that subtree, not by forking the
component's CSS.
- Design-tool token sync (Figma variables to CSS) is a build pipeline
concern; hand-editing generated token files breaks the loop.
Wersje
W bazie nie ma innych skilli o nazwie css-theming.
Migawka bazy z 13.11.2026 · wersja paczki 01d4fb09a416 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100design-tokens
Pomaga budować i oceniać systemy motywów: trójwarstwowy model tokenów, nazewnictwo według przeznaczenia, tryb ciemny, zmienne CSS, przełączanie motywów i specyfikację DTCG. - 95frontend-theming
Wdraża tryb ciemny i jasny oraz system motywów na zmiennych CSS, tokenach projektowych i przełączniku motywu. - 90theme-system-design
Projektuje system motywów: tokeny projektowe, warstwy tokenów semantycznych, zmienne CSS, przełączanie motywów w czasie działania i gwarancje kontraktu motywu. - 90frontend-theming
Pilnuje motywu i tokenów kolorów w interfejsie RomM v2, bez literałów hex i z podziałem na jasny i ciemny motyw. - 100theme-system
Buduje architekturę motywów w CSS custom properties dla 4 motywów (studio, earth, athlete, gradient) z przełączaniem przez atrybut data-theme i komponentami świadomymi motywu. - 100devextreme-theming
Stosuje, dostosowuje i przełącza motywy DevExtreme (Generic, Material, Fluent) w Angular, React, Vue, jQuery i ASP.NET Core: ThemeBuilder, zmienne SCSS, nadpisania CSS, swatche kolorów i przełączanie w czasie działania.