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

animation-performance

ما الذي تفعله

هذه المهارة تفحص رسوم CSS المتحركة بحثًا عن خصائص تُبطئ العرض. وهي موجهة لمطوري الويب الذين يريدون حركة سلسة في المواقع.

متى تستخدمها

  • ✓عندما تبدو رسوم CSS المتحركة متقطعة أو مترددة في الصفحة.
  • ✓عندما تحرّك ورقة الأنماط الحجم أو الموضع أو الهامش.
  • ✓عندما تريد أن تحترم رسومك المتحركة إعدادات تقليل الحركة.

رابط المهارة

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/animation-performance/SKILL.md

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

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

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

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

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

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

“رسوم انزلاق القائمة لدي تتقطع على الهاتف. افحص CSS واجعلها أكثر سلاسة.”

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

كيف تعمل

يجد الوكيل الرسوم التي تغيّر خصائص التخطيط، ويحوّلها إلى تغييرات في transform وopacity، ويقترح احترام إعداد تقليل الحركة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Use transform and opacity for animations

Animating layout properties (width, height, top, margin) triggers the full browser rendering pipeline on every frame — style recalculation, layout, paint, and composite. This runs on the main thread and competes with JavaScript. Animating transform and opacity skips layout and paint entirely and runs on a dedicated GPU thread, achieving smooth 60fps even when the main thread is busy.

Quick Reference

  • Only transform and opacity can be composited on the GPU without triggering layout
  • Use will-change: transform sparingly to promote an element to its own compositor layer
  • Prefer CSS transitions and animations over JavaScript animation libraries for simple effects
  • Respect prefers-reduced-motion to disable animations for users who need it

Check

Find CSS animations or transitions in this file that animate layout-triggering properties like top, left, width, height, or margin. Flag them for optimization.

Fix

Convert layout-triggering animations to use transform equivalents: position changes to translate(), size changes to scale().

Explain

Explain the browser rendering pipeline, why transform and opacity are performant for animation, and how the GPU compositor works.

Code Review

Review stylesheets, component styles, and responsive states related to Use transform and opacity for animations. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/animation-performance

الأسئلة الشائعة

لماذا تكون transform وopacity أسلس؟

تنص المهارة على أن معالج الرسوميات يتولاهما دون تشغيل التخطيط والرسم في كل إطار.

ماذا يفعل will-change؟

تنص المهارة على استخدامه بحذر، لمنح العنصر طبقة عرض خاصة به.

هل أستخدم مكتبة للتأثيرات البسيطة؟

توصي المهارة بانتقالات وحركات CSS للتأثيرات البسيطة بدلًا من مكتبات الرسوم بـ JavaScript.

التفاصيل

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

Use when reviewing stylesheets, component styles, and responsive behavior related to Use transform and opacity for animations. Check the rendered layout across breakpoints and interaction states before proposing a fix.

repo: thedaviddias/Front-End-Checklist

الشعبية

نجوم GitHub
75k
الترتيب
#2722
الترخيص
MIT
آخر تحديث
31‏/10‏/2026

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

0

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

التعليقات

  • …

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

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