CSS
Writes and debugs CSS: flexbox and grid layout, z-index and stacking, responsive breakpoints, theming, and render performance. Use when a layout breaks or…
от clawic★ 23 звезды на GitHub
Установить CSS в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
User preferences and memory live in ~/Clawic/data/css/ (see setup.md on first use, memory-template.md for the file format). If you have data at an old location (~/css/ or ~/clawic/css/), move it to ~/Clawic/data/css/, and say in one line that you moved it and from where.
Configuration
User-dependent variables. Defaults apply until the user states a preference; store them in ~/Clawic/data/css/config.yaml.
| Variable | Type | Default | Effect |
|---|---|---|---|
| authoring_mode | plain-css | sass | tailwind | css-in-js | plain-css | Syntax of every emitted example, and which advice in architecture.md applies (layers and nesting vs utility ordering vs zero-runtime extraction) |
| browser_support | evergreen | widely-available | legacy | evergreen | Gates which features ship bare vs behind @supports: legacy also adds vendor-prefixed fallbacks and blocks the Chromium-first features flagged in compatibility.md |
| naming_convention | bem | utility | css-modules | none | none | Class names in examples and the specificity ceiling enforced in reviews (architecture.md — Keeping It Clean) |
| rem_base | number px (10-16) | 16 | Every px→rem conversion, including the fluid-type derivation in responsive.md (rem term = px ÷ rem_base) |
| a11y_target | aa | aaa | aa | Which row of Accessibility Floor gates output: AA = 4.5:1 body / 24×24 targets, AAA = 7:1 body / 44×44 targets |
| explanation_depth | mechanism | fix-only | mechanism | How much of the why ships with each answer: mechanism names the cause (stacking context, flex sizing) before the declaration; fix-only emits the declaration plus one line |
| output_shape | diff | full-sheet | diff | Emitted code: diff = only the changed declarations in context; full-sheet = the complete rewritten stylesheet or component block |
Preference areas to record as the user reveals them:
- tooling — build chain (PostCSS, Lightning CSS, bundler), formatter and lint rules, whether native nesting is allowed
- conventions — spacing and type scale in use, token naming, file-per-component vs grouped sheets
- output — beyond
explanation_depthandoutput_shape: comment density in emitted CSS, longhand vs shorthand, whether fallbacks and@supportsbranches are shown or assumed, how much of the trade-off to state before choosing - platform — target surfaces (app, marketing site, HTML email, print/PDF), device mix, whether RTL or CJK is in scope
- risk posture — appetite for Chromium-first features, tolerance for
!importantin third-party overrides, how loudly to flag accessibility regressions - constraints — banned techniques (CSS-in-JS, utility classes,
@import), inherited legacy stylesheets that must keep working
When To Use
- Debugging layout: z-index that won't apply, overflow, dead
height: 100%, brokenposition: sticky, mystery horizontal scroll - Building components and starting stylesheets: reset and base layers, flexbox/grid patterns, centering, forms, tables, overlays, responsive behavior without media-query sprawl
- Production hardening: layout shift, animation jank, font loading, print output, the accessibility floor
- Replacing JS or preprocessor hacks with native CSS (
:has(),@layer,@scope, container queries, scroll snap, anchor positioning) - Cross-engine work: a rule that lands in Chrome and not Safari, RTL mirroring, HTML email constraints
- Not for visual design decisions (palettes, spacing scales, typography choice) — this skill covers mechanics, not taste
Quick Reference
| Situation | Play |
|---|---|
| z-index ignored despite a huge value | Stacking Contexts below — find the context root; never just bump the number |
| Flex item overflows / text won't truncate | min-width: 0 on the flex child (default min-width is min-content) |
| The rule is written but nothing changes | debugging.md — symptom→cause chains, starting with "is it even matching?" |
| Breaks with real content, sticky dead, footer floats, margin leaks | layout.md |
| Component must adapt to its container; fluid type; mobile viewport bugs | responsive.md |
Specificity fight, @layer, :has(), custom-property gotchas |
selectors.md |
| Jank, layout shift, slow paint, font flash | performance.md |
| Transition never fires, enter/exit animation, view transitions, reduced motion | animations.md |
| Line-height inheritance, measure, variable fonts, hyphenation, tabular numbers | typography.md |
oklch vs hsl, color-mix(), gradient banding, wide gamut |
color.md |
| Dark mode, design tokens, multi-brand, theme flash on load | theming.md |
| Inputs, selects, checkboxes, validation states, autofill styling | forms.md |
| Modal behind the header, dropdown clipped, tooltip placement | overlays.md |
| Scroll snap, custom scrollbars, anchor link lands under the sticky header | scrolling.md |
| Data table: sticky header, responsive behavior, column sizing | tables.md |
| Shadows, f |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _meta.json
- animations.md
- architecture.md
- color.md
- compatibility.md
- debugging.md
- effects.md
- forms.md
- internationalization.md
- layout.md
- memory-template.md
- overlays.md
- performance.md
- print.md
- reset.md
- responsive.md
- scrolling.md
- selectors.md
- setup.md
- tables.md
- theming.md
- typography.md
FAQ
Что делает скилл CSS?
Writes and debugs CSS: flexbox and grid layout, z-index and stacking, responsive breakpoints, theming, and render performance. Use when a layout breaks or overflows, z-index does nothing, the page scrolls sideways, `position: sticky` won't stick, text won't truncate, styles lose the cascade or need `!important`, content jumps while loading (CLS), transitions stutter, fonts flash, a modal or dropdown sits behind other content, form controls need restyling, a table needs sticky headers, printing comes out wrong, or a style works in Chrome but not Safari. Also for starting a stylesheet from scratch (reset and base layer), centering, container queries, fluid type with clamp(), design tokens and dark mode, RTL and logical properties, and modernizing old stylesheets with `:has()`, `@layer`, and nesting. Not for visual design taste — palettes, spacing scales, typeface choice.
Как установить скилл CSS?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл CSS запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…