mengto/skills

css-alpha-masking

Apply CSS alpha masking with linear-gradient for horizontal or vertical edge fades (mask-image and -webkit-mask-image).

Ver código-fonte
Documento original do Skill

Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.

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?
do mesmo repositório

Mais Skills

Todos os Skills
mengto
Comunidade

build-awwwards-quality-sites

Art-direct and implement distinctive, motion-rich marketing, editorial, portfolio, and landing websites with original reference-inspired imagery, standout heroes, GSAP choreography, one smooth-scroll engine, optional Three.js shaders, honest icon and logo sourcing, photo avatars, accessibility, and performance safeguards. Use when a user asks for an Awwwards-quality, premium, cinematic, interactive, high-concept, or motion-led website, or explicitly requests this visual and motion system.

instalações
3
GitHub Stars
6,8 mil
Atualizado
6 de out.
mengto
Comunidade

landing-page

Use when designing or rewriting a high-converting landing page (single-offer page) for SaaS/apps/services. Covers structure, layout patterns, conversion strategies, copywriting, SEO/AEO, and common pitfalls.

instalações
2
GitHub Stars
6,8 mil
Atualizado
6 de out.
mengto
Comunidade

3d-cloth-material

Build convincing woven cloth in Three.js, with a thread-level weave normal map, sheen and anisotropic highlights, folds that never stretch the texture, hems with thickness, stitches, seams, frayed edges, fold occlusion, dye and wear variation, and light passing through thin fabric. Use for linen, silk, wool, canvas, curtains, banners, cloaks, tablecloths, tapestries or any 3D drape that currently looks like a plastic sheet, a stretched texture, or a flat coloured plane.

instalações
2
GitHub Stars
6,7 mil
Atualizado
6 de out.
mengto
Comunidade

3d-falling-leaves

Build recognizable falling leaves in world space using instanced geometry, independent tumble, coupled sideways drift, shared wind, scene occlusion, and camera-aware recycling. Use for 3D autumn leaves or drifting foliage in Three.js and similar scenes; use falling-leaves for a 2D canvas overlay.

instalações
2
GitHub Stars
6,7 mil
Atualizado
6 de out.