本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2794

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-at-property/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2794
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル