Langsung ke konten
Skillpedia
Website & UI (frontend)7.2k Β· #13419

css-border-gradient

Fungsinya

Skill ini memberi agent AI pola CSS untuk tepi gradien pada permukaan web premium. Cocok untuk desainer yang menginginkan sorotan tepi yang halus pada kartu, panel harga, dan area hero.

Kapan dipakai

  • βœ“Saat kartu, panel harga, atau modal terlihat terlalu polos dengan garis tepi datar.
  • βœ“Saat Anda menginginkan aksen merek yang tenang pada status hover atau fokus.
  • βœ“Saat permukaan kaca gelap atau hero memerlukan tepi yang lebih halus.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/css-border-gradient/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBeri kartu harga saya garis tepi gradien tipis yang menangkap cahaya, tetapi tetap dibuat halus.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menyusun latar CSS di belakang isian sehingga gradien lembut terlihat sebagai tepi tipis. Ada versi sederhana untuk permukaan solid dan versi bertopeng untuk permukaan yang sudah memiliki latar.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum

Apakah garis tepinya akan terang?

Skill ini membuat sebagian besar warna gradien tetap samar, sehingga tepinya tetap halus, tidak mengilap.

Bagaimana jika kartu sudah memiliki gambar latar?

Skill ini memiliki versi bertopeng yang membiarkan latar yang sudah ada tidak berubah.

Berapa lebar yang dipakai?

Defaultnya adalah garis tepi 1 piksel, dan 2 piksel hanya dipakai untuk kartu hero besar atau status aktif.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
7.2k
Peringkat
#13419
Lisensi
MIT
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa