Skillpedia
المواقع والواجهات (frontend)75k · #2794

css-at-property

ما الذي تفعله

تشرح هذه المهارة كيفية التصريح بنوع المتغير المخصص وقيمته الابتدائية في CSS، حتى يستطيع المتصفح تحريكه. وهي موجهة إلى مطوري الواجهات الأمامية الذين يبنون تدرجات متحركة أو رموز تصميم محددة الأنواع.

متى تستخدمها

  • ✓عندما تريد أن يتحرك متغير تدرج أو لون بسلاسة.
  • ✓عندما يتغير متغير مخصص فجأة بدلًا من أن ينتقل تدريجيًا.
  • ✓عندما تريد رموز تصميم بأنواع محددة ونطاق معرّف.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-at-property/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“اجعل التدرج في قسمي الرئيسي يتحرك بسلاسة بتسجيل متغيرات اللون الخاصة به.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يضيف الوكيل تصريحات at-property تحمل نوع syntax وقيمة ابتدائية وإعداد inherits لكل متغير مخصص يُستخدم في حركة أو انتقال.

المحتوى التقني (ملف 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؟

تقول المهارة إنها تنشئ رموزًا محصورة النطاق لا تنتقل إلى العناصر الفرعية.

ما أنواع القيم التي يمكن تحديدها؟

تعطي المهارة أمثلة مثل color وlength وnumber.

التفاصيل

الوصف الأصلي من المؤلف

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
آخر تحديث
31‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة