css-alpha-masking
/css-alpha-masking
Apply CSS alpha masking with linear-gradient for horizontal or vertical edge fades (mask-image and -webkit-mask-image). Use when asked for alpha masks, fade edges, or CSS mask gradients.
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Apply CSS alpha masking with linear-gradient for horizontal or vertical edge fades (mask-image and -webkit-mask-image). Use when asked for alpha masks, fade edges, or CSS mask gradients.
Original author description
Apply CSS alpha masking with linear-gradient for horizontal or vertical edge fades (mask-image and -webkit-mask-image). Use when asked for alpha masks, fade edges, or CSS mask gradients.
How it works
- Workflow
- Usage checklist
- Horizontal (left/right) fade
- Vertical (top/bottom) fade
- Customization knobs
- Common pitfalls
- Questions to ask when specs are missing
SKILL.md preview
--- name: css-alpha-masking description: Apply CSS alpha masking with linear-gradient for horizontal or vertical edge fades (mask-image and -webkit-mask-image). Use when asked for alpha masks, fade edges, or CSS mask gradients. --- # 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 ```css /* 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); ``` ## Vertical (top/bottom) fade ```css /* Add this inline CSS to any element */ mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent); ``` ## Customization knobs - Direction: `to right`, `to left`, `to bottom`, `to top`. - Fade depth: adjust `15%` and `85%` stops. - Strength: change `transparent` to `rgba(0,0,0,0.2)` for softer fades. ## Common pitfalls - Forgetting the `-webkit-mask-image` fallback in Safari. - Expecting masks to work on elements with `overflow: hidden` but no visible content behind. ## Questions to ask when specs are missing - Which direction should the fade go? - How wide should the fade edges be? - Is this for images, text, or a container background?
Files in this package (4)
- SKILL.md 2 KB
- demo/PROMPT.md 2 KB
- demo/index.html 16 KB
- demo/preview.jpg 48 KB
Versions
The database has no other skills named css-alpha-masking.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 384837c5657a (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100progressive-blur
Create a layered CSS progressive blur (top or bottom) using multiple backdrop-filter masks for depth and softness. Use when asked for “progressive blur”, “gradient blur overlay”, or stepped blur masks that fade from an edge of the viewport. - 95ghosty-reveal
Builds a CSS mask reveal in which images bleed into view through a feathered, cloudy edge by sliding an oversized gradient mask across each box with mask-position, then fade back out and swap, on staggered loops over a scattered layout. Use when someone asks for a soft image… - 90image-alpha-validation
Use when the task is to validate transparency, premultiplication, halos, and alpha-channel integrity. - 100game-object-components
Use this skill when working with Phaser 4 game object components and the mixin system. Covers Transform, Alpha, Tint, Origin, Depth, Flip, Mask, GetBounds, Lighting, and other shared component behaviors. Triggers on: component, mixin, transform, mask, bounds, lighting. - 100image-treatment
Treat existing images in code: CSS filters, blend modes, duotone, masks and clip-paths, overlays for text legibility, collages, SVG filters, and responsive delivery (picture/srcset/sizes, AVIF/WebP). Use when styling or serving photos on a page; to CREATE new images use… - 100tailwind-css
This skill should be used when the user asks about "Tailwind CSS", "tailwind-variants", "tv() function", "CSS-first configuration", "Tailwind breaking changes", mentions styling with Tailwind utilities, gradient syntax, or component variants with TypeScript.