css-expert
ما الذي تفعله
تقدم هذه المهارة إرشادات لـ CSS الحديث، بما في ذلك flexbox وgrid والخصائص المخصصة واستعلامات الحاوية، لبناء تخطيطات متجاوبة. وهي لمطوري الواجهات الأمامية والمصممين الذين يبنون صفحات الويب.
متى تستخدمها
- ✓عندما تحتاج إلى تخطيط صفحة يتكيف من الهاتف إلى الحاسوب المكتبي.
- ✓عندما تريد الاختيار بين flexbox وgrid لقسم معين.
- ✓عندما تريد حفظ الألوان والمسافات القابلة لإعادة الاستخدام كرموز تصميم.
رابط المهارة
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/css-expert/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اجعل بطاقات منتجاتي تظهر في شبكة متجاوبة بثلاثة أعمدة على الحاسوب وعمود واحد على الهاتف.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
توصي المهارة باستخدام flexbox لصف أو عمود واحد، وgrid للتخطيطات ثنائية الأبعاد، والخصائص المخصصة للسمات، واستعلامات الوسائط التي تبدأ من الهاتف.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
CSS Expert
A front-end layout specialist with deep command of modern CSS, from flexbox and grid to container queries and cascade layers. This skill provides precise, standards-compliant guidance for building responsive, accessible, and maintainable user interfaces using the latest CSS specifications and best practices.
Key Principles
- Use flexbox for one-dimensional layouts (rows or columns) and CSS Grid for two-dimensional layouts (rows and columns simultaneously)
- Embrace custom properties (CSS variables) for theming, spacing scales, and any value that repeats or needs runtime adjustment
- Design mobile-first with min-width media queries, layering complexity as viewport size increases
- Prefer logical properties (inline-start, block-end) over physical ones (left, bottom) for internationalization-ready layouts
- Leverage the cascade intentionally with @layer declarations to control specificity without resorting to !important
Techniques
- Use flexbox justify-content and align-items for main-axis and cross-axis alignment; flex-wrap with gap for fluid card layouts
- Define CSS Grid layouts with grid-template-areas for named regions, and auto-fit/auto-fill with minmax() for responsive grids without media queries
- Create design tokens as custom properties on :root (--color-primary, --space-md) and override them in scoped selectors or media queries
- Use @container queries to style components based on their parent container size rather than the viewport
- Build animations with @keyframes and animation shorthand; prefer transform and opacity for GPU-accelerated, jank-free motion
- Apply transitions on interactive states (hover, focus-visible) with appropriate duration (150-300ms) and easing functions
- Use the :has() selector for parent-aware styling, :is()/:where() for grouping selectors with controlled specificity
Common Patterns
- Holy Grail Layout: CSS Grid with grid-template-rows (auto 1fr auto) and grid-template-columns (sidebar content sidebar) for header/footer/sidebar page structures
- Fluid Typography: clamp(1rem, 2.5vw, 2rem) for font sizes that scale smoothly between minimum and maximum values without breakpoints
- Aspect Ratio Boxes: Use the aspect-ratio property directly instead of the legacy padding-bottom hack for responsive media containers
- Dark Mode Toggle: Define color tokens as custom properties, swap them inside a prefers-color-scheme media query or a data-theme attribute selector
Pitfalls to Avoid
- Do not use fixed pixel widths for layout containers; prefer percentage, fr units, or min/max constraints for fluid responsiveness
- Do not stack z-index values arbitrarily; establish a z-index scale in custom properties and document each layer's purpose
- Do not rely on vendor prefixes without checking current browser support; tools like autoprefixer handle this systematically
- Do not nest selectors excessively in preprocessors, as the generated CSS becomes highly specific and difficult to maintain or override
الأسئلة الشائعة
متى أستخدم grid بدل flexbox؟
استخدم grid للتخطيطات التي تحتاج إلى صفوف وأعمدة معًا، وflexbox لصف واحد من العناصر.
ما رموز التصميم؟
هي قيم مسماة، مثل اللون الأساسي أو حجم المسافة، تُحفظ كخصائص CSS مخصصة وتُعاد استخدامها في الصفحة.
هل تتجنب تجاوزات !important؟
نعم. تقترح المهارة طبقات الكاسكيد للتحكم في الأولوية بدل الاعتماد على !important.
التفاصيل
الوصف الأصلي من المؤلف
CSS expert for flexbox, grid, animations, responsive design, and modern layout techniques
repo: RightNow-AI/openfang
الشعبية
- نجوم GitHub
- 18k
- الترتيب
- #10671
- الترخيص
- Apache-2.0
- آخر تحديث
- 2/7/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
browser-automation
18kيعلّم وكيلك التحكم في متصفح الويب باستخدام Playwright، معتمدًا على محددات CSS للعثور على الأزرار والنماذج والروابط.
clip-hand-skill
18kيساعد وكيلك على صنع مقاطع فيديو قصيرة: تنزيل الفيديو، وتفريغ كلامه نصًا، وإنشاء ملفات ترجمة، وقص المقاطع باستخدام ffmpeg.
collector-hand-skill
18kيساعد وكيلك على جمع المعلومات العامة حول موضوع أو شركة، واستخراج الكيانات الأساسية وتتبع التغيرات وقياس الآراء.
infisical-sync-skill
18kيساعد وكيلك على قراءة الأسرار في خزنة Infisical وتحديثها عبر واجهتها البرمجية، مع خطوات تسجيل دخول ومعالجة واضحة للأخطاء.
مهارات مشابهة
angular-developer
280kيساعد وكيلك على كتابة شيفرة Angular وتقديم نصائح لبنية المشروع، ويفيد في بدء المشاريع الجديدة وإنشاء المكونات وتحسين الأداء وإمكانية الوصول.
frontend-a11y
280kيساعد وكيلك على جعل واجهات الويب متاحة للجميع، فيضمن أن المواقع والتطبيقات تعمل جيدًا مع قارئات الشاشة والتنقل بلوحة المفاتيح.
frontend-patterns
280kيطبّق وكيلك أنماط تطوير الواجهات الحديثة، فيحسّن الأداء ويدير الحالة ويتبع أفضل الممارسات في React وNext.js.