ux-css-layout

Applies VS Code CSS conventions for layout, naming, sizing, and text truncation.

10|1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill ux-css-layout-kevinhuangislearning
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ux-css-layout
Source: https://github.com/KevinHuangIsLearning/shortestpath-ide/tree/main/.github/skills/ux-css-layout
Command: npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill ux-css-layout-kevinhuangislearning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing CSS in the VS Code codebase requires following strict conventions for file organization, class naming, layout primitives, and text truncation, and violating them causes visual bugs like clipped text, broken flex layouts, and stylelint failures. ## Core Features & Use Cases - CSS Conventions & Naming: Enforces co-located CSS files, monaco- prefixed class naming, standard sizes, and bans new !important declarations. - Programmatic Layout Patterns: Documents SplitView, Grid, and ScrollableElement APIs for constraint-based responsive layouts without CSS media queries. - Text Overflow & Ellipsis Rules: Provides the required overflow/white-space/text-overflow trio, the min-width: 0 flex fix, and hover tooltip requirements for truncated text. - Design-System Size Tokens: Maps spacing, border-radius, font size/weight, codicon size, and stroke width to --vscode-* CSS variables with off-scale snapping rules. - Use Case: When building a new workbench view pane with a header label and action buttons, use this Skill to structure the flex row so the label truncates with ellipsis, icons stay fixed, and all spacing uses design tokens. ## Quick Start Ask the AI to write or review CSS for a VS Code workbench component following the ux-css-layout conventions, for example to fix a label that fails to truncate inside a flex container.

Frequently Asked Questions about ux-css-layout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make text truncate with ellipsis in CSS?▼

Text truncation with ellipsis requires all three properties together: overflow: hidden, white-space: nowrap, and text-overflow: ellipsis. Missing any one of them causes the text to clip without an ellipsis, which is treated as a visual bug.

Why does text-overflow ellipsis not work inside a flex container?▼

Flex children default to min-width: auto, which prevents them from shrinking below their content width, so ellipsis never triggers. Set min-width: 0 on the flex child alongside the ellipsis properties to allow truncation.

How does VS Code handle responsive layout without media queries?▼

VS Code uses a programmatic constraint-based layout system instead of CSS media queries. Views declare minimumSize and maximumSize, and SplitView or Grid distribute space using LayoutPriority, snap behavior, and ResizeObserver for container-aware sizing.

Can I use !important in VS Code CSS?▼

New !important declarations are not allowed; cascade conflicts must be resolved by increasing selector specificity with component or state-class prefixes. The narrow exception is outline: 0 !important for shared focus/active-outline suppression.

What CSS size tokens should I use instead of raw px values?▼

Use --vscode-* design tokens for spacing, corner radius, font size/weight, codicon size, and stroke width, snapping off-scale values to the nearest scale step. Every token referenced must exist in the stylelint vscode-known-variables.json sizes list.