AgentSkillsCN

css

运用 CSS 自定义属性、霓虹光效、clip-path 边框、关键帧动画,以及响应式设计,打造赛博朋克风格的用户界面。 当用户需要为组件添加样式、增添霓虹效果、创建动画、实现响应式布局、通过自定义属性进行主题化,或调试视觉问题时,可使用此技能。

SKILL.md
--- frontmatter
name: css
description: |
  Implements cyberpunk UI with CSS custom properties, neon glow effects, clip-path borders, keyframe animations, and responsive design.
  Use when: styling components, adding neon effects, creating animations, implementing responsive layouts, theming with custom properties, or debugging visual issues.
allowed-tools: Read, Edit, Write, Glob, Grep, Bash, mcp__chrome-devtools__take_screenshot, mcp__chrome-devtools__emulate, mcp__chrome-devtools__evaluate_script, mcp__playwright__browser_take_screenshot, mcp__playwright__browser_snapshot, mcp__context7__resolve-library-id, mcp__context7__query-docs

CSS Skill - Cyberpunk Portal

This codebase uses a single style.css file (1200+ lines) implementing a cyberpunk aesthetic with CSS custom properties for theming, multi-layered glow effects, clip-path borders, and extensive keyframe animations.

Quick Start

Adding Neon Glow

css
/* Use predefined glow variables for consistency */
.element {
    border: 2px solid var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.element:hover {
    border-color: var(--neon-magenta);
    box-shadow: var(--glow-magenta);
}

Clip-Path Borders (Cyberpunk Corners)

css
/* Standard corner cut pattern used throughout */
.card {
    clip-path: polygon(
        0 0, calc(100% - 15px) 0, 100% 15px,
        100% 100%, 15px 100%, 0 calc(100% - 15px)
    );
}

Responsive Breakpoints

BreakpointTargetGrid Columns
> 1024pxDesktopauto-fill, minmax(240px, 1fr)
768-1024pxTabletauto-fill, minmax(200px, 1fr)
480-768pxMobilerepeat(2, 1fr)
< 480pxSmall mobile1fr

Key Concepts

ConceptLocationExample
Color system:root lines 6-34var(--neon-cyan)
Glow presets:root lines 21-24var(--glow-magenta)
Timing vars:root lines 30-33var(--fast), var(--normal), var(--slow)
Typography:root lines 27-28var(--font-display), var(--font-body)

Common Patterns

Glitch Text Effect

css
.glitch {
    position: relative;
}
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
}
.glitch::before {
    color: var(--neon-magenta);
    animation: glitchBefore 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

Staggered Card Animations

css
.button:nth-child(1) { animation-delay: 0.1s; }
.button:nth-child(2) { animation-delay: 0.15s; }
/* Increment by 0.05s per card */

See Also

  • patterns - Color system, glow effects, animations
  • workflows - Adding components, responsive testing

Related Skills

  • See the vanilla-javascript skill for DOM manipulation patterns
  • See the frontend-design skill for UI component architecture

Documentation Resources

Fetch latest CSS documentation with Context7.

How to use Context7:

  1. Use mcp__context7__resolve-library-id to search for "css" or "mdn css"
  2. Query with mcp__context7__query-docs for specific properties

Recommended Queries:

  • "css custom properties"
  • "css clip-path"
  • "css keyframes animation"
  • "css prefers-reduced-motion"