All skills

Design

Gradient borders

Adds crisp gradient borders to cards and buttons with a masked pseudo-element.

Paste it into any prompt, or type @ in the chat.

Example prompt

Give the pricing cards gradient borders @gradient-border

What Spearbot does with it

Create gradient borders that keep rounded corners and a transparent inside.
- Pattern: the element gets position: relative and its normal background; a ::before with position:absolute; inset:0; padding:1px (the border width); border-radius:inherit; background: linear-gradient(...); and
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events:none.
- Use the site's brand colours, fading to transparent on one side for subtlety. 1px for cards, 1.5px for highlighted cards.
- Apply sparingly: the featured card or primary CTA, not every element.