Skip to main content

css-component-testing

Guides CSS and layout tests for FigUI3 components. Use when validating component CSS, nested selectors, tokens, interaction states, computed styles, layout boxes, or visual regressions.

来源信息

仓库
rogie/figui3
最近来源活动
2026年6月1日 17:43
检测到的 SKILL.md 语言
英语
星标
66
分支
1

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
css-component-testing
description
Guides CSS and layout tests for FigUI3 components. Use when validating component CSS, nested selectors, tokens, interaction states, computed styles, layout boxes, or visual regressions.
# CSS Component Testing Test public CSS behavior in a browser. Prefer computed styles and bounding boxes for stable assertions; use screenshots only for targeted visual regressions. ## What To Test - Token-driven styles resolve through CSS custom properties. - Public states work: hover, focus, selected, disabled, open, dragging. - Layout dimensions and positioning stay within expected bounds. - Light and dark `color-scheme` paths do not throw or hide content. - Nested selectors compile through the existing build pipeline. ## Test Pattern 1. Mount the smallest fixture that exposes the CSS behavior. 2. Wait for custom elements and fonts/layout to settle. 3. Read `getComputedStyle`, `getBoundingClientRect`, or public attributes/classes. 4. Assert behavior, not implementation details, unless debugging a specific regression. ## Avoid - Broad screenshot snapshots for every component. - Assertions tied to browser antialiasing or exact subpixel layout unless necessary. - Testing private class names when a public attribute/state can be asserted instead.
在 GitHub 查看