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

css-border-gradient

ما الذي تفعله

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

متى تستخدمها

  • ✓عندما تبدو بطاقة أو لوحة أسعار أو نافذة منبثقة عادية بحدود مسطحة.
  • ✓عندما تريد لمسة علامة تجارية هادئة عند حالة التمرير أو التركيز.
  • ✓عندما يحتاج سطح زجاجي داكن أو قسم بطل إلى حافة أكثر رقيًا.

رابط المهارة

https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/css-border-gradient/SKILL.md

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

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

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

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

استخدم هذه المهارة لمساعدتي: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/css-border-gradient/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

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

“أعطِ بطاقات الأسعار حدًا رفيعًا متدرجًا يلتقط الضوء، لكن اجعله خفيفًا.”

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

كيف تعمل

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

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

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

Border Gradients

Use When

  • A surface needs a more premium edge than a flat border.
  • Dark glass, pricing, hero, modal, or feature-card UI feels too plain.
  • A hover or focus state needs a quiet brand accent.

Defaults

  • Width: 1px; use 2px only for large hero cards or active states.
  • Radius: inherit the parent radius.
  • Angle: 135deg or 160deg.
  • Stops: neutral highlight, one brand accent, neutral fade.
  • Opacity: keep most stops below 0.4; subtle beats shiny.

Simple CSS Pattern

Use this when the surface has a solid or translucent fill.

.gradient-border {
  --surface: rgba(10, 14, 24, 0.72);
  --border-a: rgba(255, 255, 255, 0.34);
  --border-b: rgba(125, 92, 255, 0.36);
  --border-c: rgba(255, 255, 255, 0.08);

  border: 1px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--border-a), var(--border-b), var(--border-c)) border-box;
}
<div class="gradient-border">
  ...
</div>

Masked Pattern

Use this when the surface already has a complex background that should not be overwritten.

.gradient-border-mask {
  position: relative;
  border-radius: 20px;
}

.gradient-border-mask::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.34),
    rgba(125, 92, 255, 0.36) 45%,
    rgba(255, 255, 255, 0.08)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

Tailwind Shortcut

Use arbitrary properties for one-off surfaces.

<div class="rounded-2xl border border-transparent [background:linear-gradient(rgba(10,14,24,.72),rgba(10,14,24,.72))_padding-box,linear-gradient(135deg,rgba(255,255,255,.34),rgba(125,92,255,.36),rgba(255,255,255,.08))_border-box]">
  ...
</div>

Taste Rules

  • Apply to one hierarchy level at a time: primary card, active tab, selected plan, or hero panel.
  • Do not use rainbow borders, full-saturation neon, or animated gradients by default.
  • Keep the border quieter than the content. It should frame, not compete.
  • Pair with restrained depth: a soft shadow or inner highlight is enough.
  • Check light and dark themes separately; the same alpha rarely works for both.

Quick Checks

  • No double border from an existing border-color.
  • Radius matches the surface exactly.
  • The gradient is visible at normal zoom but barely noticeable when scanning.
  • Focus states remain accessible and do not rely only on the gradient.
الأسئلة الشائعة

هل ستكون الحدود لامعة؟

تبقي المهارة معظم ألوان التدرج باهتة، فتبقى الحافة خفيفة لا لامعة.

ماذا لو كانت للبطاقة صورة خلفية؟

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

ما العرض المستخدم؟

الافتراضي حد بعرض بكسل واحد، ويُستخدم بكسلان فقط للبطاقات البطلة الكبيرة أو الحالات النشطة.

التفاصيل

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

Apply subtle gradient-border treatments for premium web surfaces. Use when cards, pricing panels, nav bars, modals, buttons, or hero surfaces need a refined edge highlight without a loud glow.

repo: MengTo/Skills

الشعبية

نجوم GitHub
7.2k
الترتيب
#13419
الترخيص
MIT
آخر تحديث
1‏/11‏/2026

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

0

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

التعليقات

  • …

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

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