css-alpha-masking

Installation
SKILL.md

CSS Alpha Masking Skill

Workflow

  1. Confirm direction (horizontal or vertical) and fade stop percentages.
  2. Provide the inline CSS snippet and any needed class usage.
  3. Offer small tweaks only (direction, stop positions, colors).

Usage checklist

  • Apply the mask styles directly on the element or in a CSS class.
  • Always include both mask-image and -webkit-mask-image for Safari.
  • Ensure the element has visible content; masks reveal/hide alpha only.

Horizontal (left/right) fade

/* Add this inline CSS to any element */
mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
-webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
Related skills
Installs
23
Repository
mengto/skills
GitHub Stars
31
First Seen
Feb 7, 2026