css-at-property
ما الذي تفعله
تشرح هذه المهارة كيفية التصريح بنوع المتغير المخصص وقيمته الابتدائية في CSS، حتى يستطيع المتصفح تحريكه. وهي موجهة إلى مطوري الواجهات الأمامية الذين يبنون تدرجات متحركة أو رموز تصميم محددة الأنواع.
متى تستخدمها
- ✓عندما تريد أن يتحرك متغير تدرج أو لون بسلاسة.
- ✓عندما يتغير متغير مخصص فجأة بدلًا من أن ينتقل تدريجيًا.
- ✓عندما تريد رموز تصميم بأنواع محددة ونطاق معرّف.
رابط المهارة
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-at-property/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اجعل التدرج في قسمي الرئيسي يتحرك بسلاسة بتسجيل متغيرات اللون الخاصة به.”
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.
الشعبية
- نجوم GitHub
- 75k
- الترتيب
- #2794
- الترخيص
- MIT
- آخر تحديث
- 31/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
frontendchecklist
75kيفحص شيفرة الواجهة الأمامية والصفحات الحية مقابل أكثر من 380 قاعدة للوصول وسرعة الأداء وتحسين محركات البحث والأمان، بأداة سطر أوامر.
frontend-checklist-global
75kيدقق مشروع الواجهة الأمامية وفق كل قواعد Front-End Checklist البالغ عددها 386، ويقدم إصلاحًا محددًا لكل مشكلة وجدت.
404-page
75kيتأكد من أن صفحة الصفحات غير الموجودة تقدم روابط مفيدة وتُرجع رمز حالة 404 حقيقيًا، لمساعدة الزوار التائهين على إيجاد طريقهم.
about-page
75kيراجع ما إذا كان لموقعك صفحة «من نحن» واضحة تشرح من يديره، لبناء الثقة لدى الزوار ومحركات البحث.
مهارات مشابهة
angular-developer
280kيساعد وكيلك على كتابة شيفرة Angular وتقديم نصائح لبنية المشروع، ويفيد في بدء المشاريع الجديدة وإنشاء المكونات وتحسين الأداء وإمكانية الوصول.
frontend-a11y
280kيساعد وكيلك على جعل واجهات الويب متاحة للجميع، فيضمن أن المواقع والتطبيقات تعمل جيدًا مع قارئات الشاشة والتنقل بلوحة المفاتيح.
frontend-patterns
280kيطبّق وكيلك أنماط تطوير الواجهات الحديثة، فيحسّن الأداء ويدير الحالة ويتبع أفضل الممارسات في React وNext.js.