css-at-property
できること
このスキルは、ブラウザがアニメーションできるように、CSSのカスタムプロパティの型と初期値を宣言する方法を説明します。アニメーションするグラデーションや、型付きのデザイントークンを作るフロントエンド開発者向けです。
使う場面
- ✓グラデーションや色の変数を、滑らかにアニメーションさせたいとき。
- ✓カスタムプロパティが、トランジションせずに急に変わるとき。
- ✓定義された型と範囲を持つデザイントークンが欲しいとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-at-property/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のヒーローセクションの色の変数を登録して、グラデーションが滑らかにアニメーションするようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、アニメーションやトランジションで使われる各カスタムプロパティに、syntaxの型、初期値、inheritsの設定を持つ@propertyの宣言を追加します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Register CSS custom properties with @property for animation and type safety
CSS custom properties are powerful but limited by default: they are untyped string substitutions that the browser cannot interpolate during transitions or animations. Registering a property with @property gives the browser the information it needs to animate between values, validate token assignments, and scope inheritance — turning custom properties from string macros into first-class typed values. This unlocks gradient animations, typed design tokens, and scoped component theming that are impossible with unregistered properties.
Quick Reference
- Unregistered custom properties cannot be animated — they transition as discrete strings
- @property specifies syntax (color, length, number), initial-value, and inherits
- Registered properties enable smooth interpolation for gradients and complex values
- inherits: false creates scoped tokens that do not cascade to children
Check
Review the CSS custom properties in this file. Identify any properties that are used in transitions or animations — these require @property registration to animate correctly.
Fix
Add @property registrations for the custom properties used in transitions or animations in this CSS. Include the correct syntax descriptor, an initial-value, and the appropriate inherits value.
Explain
Explain how @property works, why unregistered custom properties cannot be animated, what the syntax descriptor values mean, and how inherits controls cascade behaviour.
Code Review
Inspect all CSS transitions and animations that reference custom properties. Flag any custom property used in a transition or animation that is not registered with @property, and flag any @property registration that is missing initial-value.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/css-at-property
よくある質問
通常のカスタムプロパティは、なぜアニメーションできないのですか?
登録されていないカスタムプロパティはテキストとして扱われるため、ブラウザが値の間を補間できないと、このスキルは説明しています。
inheritsをfalseにすると、何が起きますか?
子要素に引き継がれない、範囲付きのトークンを作ると、このスキルは説明しています。
どんな種類の値に型を付けられますか?
色、長さ、数値などの例が挙げられています。
詳細
作者による元の説明
Use when implementing animated gradients, complex CSS transitions that involve custom property values, or building a typed design token system where custom property misuse should produce visible errors.
人気
- GitHubのスター
- 75k
- ランキング
- #2794
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。