Css border gradient

From bidewio/better-openclaw · View interactive version

Css border gradient is an AI agent skill from the GitHub repository bidewio/better-openclaw. Create CSS gradient borders using the pseudo-element mask technique (mask-composite), including Tailwind-friendly usage and customization of angle, colors, thickness, and radius.

How to use this skill

Skill file

CSS Border Gradient Skill

Baseline snippet

.border-gradient { position: relative; }
.border-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: linear-gradient(225deg,
    rgba(255,255,255,0.0) 0%,
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0.0) 100%);
  pointer-events: none;
}

Usage checklist

Tailwind example

<div class="border-gradient rounded-lg before:rounded-lg">...</div>

Customization knobs

Common pitfalls

Tips for AI Agents

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.