Langsung ke konten
Skillpedia
Website & UI (frontend)75k Β· #2794

css-at-property

Fungsinya

Skill ini menjelaskan cara mendeklarasikan tipe dan nilai awal properti kustom CSS, sehingga browser dapat menganimasikannya. Cocok untuk pengembang front end yang membuat gradien animasi atau token desain bertipe.

Kapan dipakai

  • βœ“Saat Anda ingin variabel gradien atau warna beranimasi dengan halus.
  • βœ“Saat properti kustom berubah secara tiba-tiba alih-alih beralih secara bertahap.
  • βœ“Saat Anda menginginkan token desain dengan tipe dan cakupan yang jelas.

Link skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-at-property/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-at-property/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuat gradien di bagian hero saya beranimasi dengan halus dengan mendaftarkan variabel warnanya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menambahkan deklarasi at-property dengan tipe sintaks, nilai awal, dan pengaturan inherits untuk setiap properti kustom yang dipakai dalam animasi atau transisi.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

Pertanyaan umum

Mengapa properti kustom biasa tidak bisa beranimasi?

Skill menyatakan properti kustom yang tidak terdaftar diperlakukan sebagai teks, sehingga browser tidak dapat membaurkan nilainya.

Apa fungsi inherits false?

Skill menyatakan itu membuat token berlingkup yang tidak diturunkan ke elemen anak.

Jenis nilai apa saja yang bisa diberi tipe?

Skill memberi contoh seperti warna, panjang, dan angka.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
75k
Peringkat
#2794
Lisensi
MIT
Diperbarui
31/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa