New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Apply subtle gradient-border treatments for premium web

Border Gradients

by MengTo · MIT license · ★ 6,243 on GitHub · updated Sep 23

Border Gradients cover

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.

---
name: css-border-gradient
description: 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.
---

# 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.

Overview

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.

Manual install (npx, ZIP)
Claude Codenpx skills add MengTo/Skills --skill css-border-gradient -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/MengTo/Skills/tar.gz/a965851e27dc \ | tar -xz -C ~/.claude/skills --strip-components=3 Skills-a965851e27dc/agent-skills/web-design/css-border-gradient
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/ac6a14edc3dae81b5eb0/css-border-gradient.zip" -OutFile "$env:TEMP\css-border-gradient.zip"; Expand-Archive "$env:TEMP\css-border-gradient.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md2.9 KB
  • demo/11 files · 2.7 MB
Read the files here
MengTo/a96585112 files
SKILL.md
Show the full text95 lines

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.
1---
2name: css-border-gradient
3description: 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.
4---
5 
6# Border Gradients
7 
8## Use When
9- A surface needs a more premium edge than a flat `border`.
10- Dark glass, pricing, hero, modal, or feature-card UI feels too plain.
11- A hover or focus state needs a quiet brand accent.
12 
13## Defaults
14- Width: `1px`; use `2px` only for large hero cards or active states.
15- Radius: inherit the parent radius.
16- Angle: `135deg` or `160deg`.
17- Stops: neutral highlight, one brand accent, neutral fade.
18- Opacity: keep most stops below `0.4`; subtle beats shiny.
19 
20## Simple CSS Pattern
21Use this when the surface has a solid or translucent fill.
22 
23```css
24.gradient-border {
25 --surface: rgba(10, 14, 24, 0.72);
26 --border-a: rgba(255, 255, 255, 0.34);
27 --border-b: rgba(125, 92, 255, 0.36);
28 --border-c: rgba(255, 255, 255, 0.08);
29 
30 border: 1px solid transparent;
31 border-radius: 20px;
32 background:
33 linear-gradient(var(--surface), var(--surface)) padding-box,
34 linear-gradient(135deg, var(--border-a), var(--border-b), var(--border-c)) border-box;
35}
36```
37 
38```html
39<div class="gradient-border">
40 ...
41</div>
42```
43 
44## Masked Pattern
45Use this when the surface already has a complex background that should not be overwritten.
46 
47```css
48.gradient-border-mask {
49 position: relative;
50 border-radius: 20px;
51}
52 
53.gradient-border-mask::before {
54 content: "";
55 position: absolute;
56 inset: 0;
57 border-radius: inherit;
58 padding: 1px;
59 background: linear-gradient(
60 145deg,
61 rgba(255, 255, 255, 0.34),
62 rgba(125, 92, 255, 0.36) 45%,
63 rgba(255, 255, 255, 0.08)
64 );
65 -webkit-mask:
66 linear-gradient(#fff 0 0) content-box,
67 linear-gradient(#fff 0 0);
68 -webkit-mask-composite: xor;
69 mask-composite: exclude;
70 pointer-events: none;
71}
72```
73 
74## Tailwind Shortcut
75Use arbitrary properties for one-off surfaces.
76 
77```html
78<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]">
79 ...
80</div>
81```
82 
83## Taste Rules
84- Apply to one hierarchy level at a time: primary card, active tab, selected plan, or hero panel.
85- Do not use rainbow borders, full-saturation neon, or animated gradients by default.
86- Keep the border quieter than the content. It should frame, not compete.
87- Pair with restrained depth: a soft shadow or inner highlight is enough.
88- Check light and dark themes separately; the same alpha rarely works for both.
89 
90## Quick Checks
91- No double border from an existing `border-color`.
92- Radius matches the surface exactly.
93- The gradient is visible at normal zoom but barely noticeable when scanning.
94- Focus states remain accessible and do not rely only on the gradient.
95 
View all files on GitHub →

Details

Updated
Sep 23, 2026
License
MIT
Stars on the repo
★ 6,243
Checked
Source
MengTo/Skills ↗
Creator
MengTo · 6 listings
View creator

Similar skills

See all →
SkillReverse engineer native, managed, Electron/JavaScriptREAmorluto/rea · by morlutoReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.★ 316k GitHub starsSkillBrainstorms ideas into designs before any creative workBrainstorming Ideas Into Designsobra/superpowers · by obraYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.★ 290k GitHub starsSkillRequires technical rigor and verificationCode Review Receptionobra/superpowers · by obraUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation★ 290k GitHub starsSkillDiagnosis loop for hard bugs and performance regressionsDiagnosing bugsmattpocock/skills · by mattpocockDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.★ 267k GitHub starsSkillImplement the result of /to-spec and /to-tickets in codeImplement specmattpocock/skills · by mattpocockImplement the result of /to-spec and /to-tickets in code.★ 267k GitHub starsSkillWriting a PR bodymattpocock/skills · by mattpocockUse when writing a PR body.★ 267k GitHub stars

More from MengTo

SkillBuild rich, scroll-controlled real-time Three.js experiencesBuild Three.js Scroll WorldsMengTo/Skills · by MengToBuild rich, scroll-controlled real-time Three.js experiences as one persistent 3D world whose camera, lighting, atmosphere, materials, objects, DOM story, and interactions evolve across authored chapters. Use for 3D scrollytelling, scroll-driven WebGL worlds, camera journeys, interactive portfolios, product stories, exhibitions, explainers, game or film microsites, spatial narratives, and multi-scene websites where native scroll should travel through one continuous place. Not limited to landing pages.★ 6.2k GitHub starsSkillBuild, fix and review character combat animations so theyGame dev: combat animationMengTo/Skills · by MengToBuild, fix and review character combat animations (melee strikes, bow shots, spell casts, skills, monster attacks, whole move sets) so they read like Diablo IV, Baldur's Gate 3 or Elden Ring and never stretch, lock, wring or break an arm, wrist or hand. A written standard with numbered rules, per-frame tests on the real skinned mesh, keys designed from upper-arm, forearm and blade intents, checks from every camera the player sees, two blind critics plus a blind A/B against the last release, and every critic claim verified against full-resolution frames and live-rig numbers. Use when creating or reworking any attack, skill or move set; when the user says arms, hands, wrists, elbows or weapons look stretched, weird, broken or wrong; when they ask for a standard, rules or tests for animations; or when they ask to score animations or get them to N out of 10.★ 6.2k GitHub starsSkillScore a game's combat skills and spells out of 10 with blindGame dev: combat skill polishMengTo/Skills · by MengToScore a game's combat skills and spells out of 10 with blind judges, then raise the weakest to a bar, for timing and readability (does a skill read as itself, does the blow land when it lands) and for art (detail, light, trails, impact, art direction, judged against a reference such as Diablo IV). Covers filming casts on a stopped, stepped clock, contact strips and close-ups, anonymised two-judge rounds, the levers that moved scores (hero props made from a painted concept with image-to-3D, own schedules and keyed moves, painted additive textures, camera-facing ribbons, light outside the body), the traps that cost points, asset and load budgets, and shipping each skill as its own version. Use when the user asks to score, review, improve, polish or rebuild combat skills, spells or attacks; says a skill "doesn't make sense", "looks bad" or should look like another game; names a target score; or starts a "next skill" thread. Project specifics (review hooks, harness settings, where each skill's code lives, scores so far) go in an optional local references/<project>.md next to this skill.★ 6.2k GitHub starsSkillBuild a cursor trail whose spacing stays constant at anyPointer trail emitterMengTo/Skills · by MengToBuild a cursor trail whose spacing stays constant at any hand speed, by emitting motes per unit of distance travelled rather than on a timer, so a flick draws the same continuous ribbon as a crawl instead of breaking into scattered dots. Covers sub-segment placement, the ring-buffer ordering trap, the idle breath a distance emitter needs, anchoring the trail to the screen in a 3-D scene, scaling scatter against the plane it hangs on, coasting instead of stopping dead, touch and reduced-motion fallbacks, and why moving the emitter to a DOM overlay to raise its z-index costs more than it buys. Use for cursor wisps, pointer sparks, embers, magic trails, comet tails, plankton, dust, or any mote trail that must stay legible however fast the hand moves.★ 6.2k GitHub starsSkillTurn an article, case study, brand narrativeScroll world storytellingMengTo/Skills · by MengToTurn an article, case study, brand narrative, product journey, or long-form story into a cinematic scroll-driven landing page using one of three renderers: scrubbed video, a real-time Three.js world, or semantic HTML/SVG data and typography. Use when the user asks for a scroll world, fly-through landing page, article-to-website transformation, animated planet, data scrollytelling, video-scrubbed page, connected visual journey, or story-led alternative to ordinary stacked sections.★ 6.2k GitHub stars