Skip to main content
skill CX Codex

css-border-gradient — Claude Code skill: what it does, how to install

Applies refined gradient border treatments to cards, modals, and buttons in CSS or Tailwind. Useful when surfaces need subtle edge highlights without loud glowing outlines.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MengTo/Skills --skill css-border-gradient -a claude-code
Open on GitHub

What css-border-gradient does

The skill provides CSS snippets and design guidelines for delicate borders on interface components. Instead of flat borders or intense neon glows, the agent builds quiet edge highlights at 135deg or 160deg angles. The standard border width is 1px; 2px is reserved for large hero panels or active states. Stop opacity stays below 0.4 so the border frames the content without overpowering it.

Three implementation techniques are included. The standard pattern combines two linear-gradient layers with padding-box and border-box alongside a transparent border. When an element already has a complex background image, a masked pseudo-element with mask-composite: exclude preserves the underlying graphics. A Tailwind shortcut also maps the properties into arbitrary utility classes.

The same alpha value rarely works for both light and dark themes. Contrast shifts between color modes, so border stops require separate tuning for dark and light surfaces.

What it helps with

  • Highlight pricing cards with a subtle gradient edge
  • Render a gradient border over complex backgrounds using CSS masks
  • Construct Tailwind arbitrary utility classes for border highlights
  • Style active tabs or focused buttons without loud glow effects

Example prompts for the agent

  • Create a 1px subtle gradient border for a pricing card with a brand accent.
  • Add a masked pseudo-element border to a modal without overwriting its background.
  • Convert this gradient border treatment into Tailwind arbitrary utility classes.

How to install css-border-gradient

1Skills CLI (Vercel)

npx skills add MengTo/Skills --skill css-border-gradient -a claude-code

2Manually: put the files in place

~/.claude/skills/css-border-gradient/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/css-border-gradient/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about css-border-gradient

How do I install css-border-gradient in Claude Code?

Run npx skills add MengTo/Skills --skill css-border-gradient -a claude-code.

What does css-border-gradient do?

It instructs the coding assistant how to write subtle gradient borders using CSS and Tailwind. The instructions keep border accents quiet and prevent noisy rainbow gradients.

When should I use the masked pattern instead of padding-box?

Use the masked pseudo-element pattern when the container has an existing image or complex background that would be overwritten by a standard surface fill.

Source text

SKILL.md · MIT
---
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.

## Simple CSS Pattern
Use this when the surface has a solid or translucent fill.

```css
.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;
}
```

```html
<div class="gradient-border">
  ...
</div>
```

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

```css
.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.

```html
<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.

© MengTo · MIT · MengTo/Skills

Similar skills

Everything for Frontend and UI →

From the same set148

container-lines This skill adds thin vertical guide lines at the edges of the content container, plus mini corner squares on sections. Useful when a layout feels loose and needs structure. CX Codex +1 1,500installs company-logos Guides agents to use Iconify Simple Icons in a 64x64 box instead of plain text names or random raster images. CX Codex +1 1,500installs marquee-loop This skill guides an agent through building a looping marquee from repeated items. Use it for scrolling logos, testimonials, screenshots, or tags. CX Codex +1 1,500installs matterjs Walks the agent through a Matter.js scene: engine, render, runner, bodies and mouse dragging. Useful when a canvas needs physics. CX Codex +1 1,500installs scroll-scrubbed-visual-sequence Builds reversible visual scenes driven by native scrolling, from product assembly to interface walkthroughs. Useful for interactive hero sections, diagrams, and image sequences. CX Codex +1 1,500installs unsplash-asset-images This skill picks Unsplash photos for avatars, headshots, backgrounds and wallpapers, and names the ratios and resolutions you need. CX Codex +1 1,600installs scroll-world-storytelling Turns articles, case studies, and product journeys into visual scroll-driven landing pages. Useful when you need a connected story instead of generic stacked sections. CX Codex +1 1,600installs staggered-word-reveal Builds word-by-word text reveals as content enters the viewport. Use it for short headlines, section intros, quotes, and hero copy. CX Codex +1 1,600installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor