[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78GZ16YCV8G87V26BVTJZ2H":3,"skill-same:01M78GZ16YCV8G87V26BVTJZ2H":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M78GZ16YCV8G87V26BVTJZ2H","ux-css-layout",null,"VS Code (and so Ganttee) CSS conventions, file organization, class naming, standard sizes, scrollable content, responsive layout, and text overflow\u002Fellipsis patterns. Use when writing CSS, building layouts, or fixing text truncation issues.","sergehas\u002Fganttee","sergehas","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F55877559?v=4","01M78GWP103XC9MZP2826NNTF3","01M78GWP22QVFBQNG8FAPPHE7Z",1,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Fux-css-layout\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ux-css-layout\ndescription:\n  VS Code (and so Ganttee) CSS conventions, file organization, class naming, standard sizes,\n  scrollable content, responsive layout, and text overflow\u002Fellipsis patterns. Use when writing CSS,\n  building layouts, or fixing text truncation issues.\n---\n\nThis skill covers CSS file organization, naming, standard sizes, scrollable content, responsive\npatterns, and text overflow handling.\n\n---\n\n## 1. File Organization\n\nCSS files are **co-located** with their TypeScript components:\n\n```\nsrc\u002Fui\u002Fbutton\u002F\n    button.ts\n    button.css\nsrc\u002Fui\u002FmyFeature\u002F\n    myFeature.ts\n    media\u002F\n        myFeature.css\n```\n\nImport CSS directly in the TS file:\n\n```typescript\nimport \".\u002Fmedia\u002FmyFeature.css\";\n\u002F\u002F or for base widgets:\nimport \".\u002Fbutton.css\";\n```\n\nWorkbench-level global styles live in `src\u002Fvs\u002Fworkbench\u002Fbrowser\u002Fmedia\u002F`.\n\n## 2. Class Naming\n\n- **`ganttee-` prefix** for all major components: `.ganttee-workbench`, `.ganttee-split-view2`,\n  `.ganttee-scrollable-element`\n- **Modifier classes**: `.ganttee-split-view2.vertical`, `.ganttee-split-view2.horizontal`\n- **State classes**: `.visible`, `.focused`, `.active`, `.highlight`\n- Feature-specific classes use kebab-case without prefix: `.my-feature`, `.outline-pane`,\n  `.welcome-view-content`\n\n## 3. Standard Sizes\n\n| Element                      | Size                               |\n| ---------------------------- | ---------------------------------- |\n| Part title height            | 35px                               |\n| Title padding (horizontal)   | 8px                                |\n| Title label inner padding    | 12px                               |\n| Action area padding          | 5px                                |\n| Action icon size             | 16px                               |\n| Body font-size               | 13px (workbench), 11px (HTML body) |\n| Line height                  | 1.4em                              |\n| Validation message font-size | 12px (line-height: 17px)           |\n\n> For `padding`\u002F`margin`\u002F`gap`, `border-radius`, `font-size`\u002F`font-weight`, codicon size and border\n> width, prefer the design-system **size tokens** over raw px — see\n> [§8 Design-System Size Tokens](#8-design-system-size-tokens-spacing-radius-font-codicon-stroke).\n> Canonical reference: `.github\u002Finstructions\u002Fdesign-tokens.instructions.md` (auto-injected for\n> `src\u002Fvs\u002F**\u002F*.css`).\n\n## 4. CSS Selector Quality\n\n| Anti-pattern (flagged)                               | Correct pattern                |\n| ---------------------------------------------------- | ------------------------------ |\n| ID selectors for styling (`#my-widget`)              | Class selectors (`.my-widget`) |\n| Overly specific selectors                            | Minimal specificity needed     |\n| Styles in the wrong file                             | Co-located with the component  |\n| Missing `min-width: 0` on flex children              | Prevents truncation issues     |\n| Forgetting `pointer-events: none` on hidden overlays | Prevents click-through bugs    |\n\n## 5. Scrollable Content\n\nThree classes for different needs:\n\n| Class                     | When to Use                                            |\n| ------------------------- | ------------------------------------------------------ |\n| `SmoothScrollableElement` | Animated scrolling (SplitView, ListView)               |\n| `DomScrollableElement`    | Wrap existing DOM content (hovers, menus, breadcrumbs) |\n| `ScrollableElement`       | Basic single-direction scrollbar                       |\n\n```typescript\nconst scrollable = new DomScrollableElement(contentNode, {\n  horizontal: ScrollbarVisibility.Auto,\n  vertical: ScrollbarVisibility.Auto,\n});\nthis._register(scrollable);\ncontainer.appendChild(scrollable.getDomNode());\nscrollable.scanDomNode(); \u002F\u002F call after content changes\n```\n\n## 6. Responsive Layout\n\nVS Code (and so Ganttee) does **not** use CSS media queries. Instead, it uses a **programmatic\nconstraint-based layout system**:\n\n- `IView.minimumSize` \u002F `maximumSize` — views declare their size constraints.\n- `SplitView` and `Grid` distribute space according to constraints and `LayoutPriority`.\n- `ResizeObserver` is used for container-aware sizing (e.g., editor auto-layout).\n- The window is treated as a fixed viewport; space is distributed via sash-based resizing.\n\nWhen building a responsive component:\n\n1. Set `minimumSize` \u002F `maximumSize` appropriately.\n2. Use `LayoutPriority.Low` for panels that should collapse first.\n3. Use `snap: true` for panels that should snap closed when too small.\n4. Fire `onDidChange` when your constraints change dynamically.\n\n### Extension Webview Layout\n\n- Use CSS Grid or Flexbox in browser webviews.\n- Use media or container queries when the webview needs them.\n- Use `ResizeObserver` or the widget resize API for container-bound widgets such as ECharts.\n- Add `min-width: 0` and the ellipsis pattern to constrained flex or grid text.\n- Do not apply workbench `SplitView`, `Grid`, or no-media-query rules to browser webviews.\n\n### Extension Webview CSS\n\n- Use injected VS Code theme color variables.\n- Use on-scale pixels or feature-local CSS custom properties for size values.\n- Colocate CSS with its feature.\n- Use `.styles.ts` only with an adopted CSS-in-JS pipeline.\n\n## 7. Text Overflow & Ellipsis\n\nAll text labels that can be truncated by a resizable container **must** use the ellipsis pattern.\nClipped text without an ellipsis is a visual bug.\n\n### Standard Ellipsis Pattern (CSS)\n\nThe three-property combo is required — all three must be present:\n\n```css\n.my-label {\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n```\n\n### Common Locations That Need Ellipsis\n\n| Element                               | Why                                                  |\n| ------------------------------------- | ---------------------------------------------------- |\n| Part title labels (`h2`, breadcrumbs) | Sidebar\u002Fpanel can be resized narrower than the title |\n| View pane header titles               | View containers can be narrow                        |\n| List\u002Ftree row labels                  | Rows have a fixed width from the list container      |\n| Tab labels (editor tabs)              | Many tabs shrink to fit                              |\n| Button labels in welcome views        | Buttons have `max-width` constraints                 |\n| Status bar items                      | Many items compete for horizontal space              |\n| Notification message text             | Notification toast\u002Fcenter has fixed width            |\n| Tooltip\u002Fhover headings                | Hovers have max-width                                |\n| Dropdown\u002Fselect items                 | Select boxes have bounded width                      |\n| Badge text \u002F descriptions             | Auxiliary text in constrained columns                |\n\n### Flex Container Gotchas\n\nFlex children default to `min-width: auto`, which **prevents** `text-overflow: ellipsis` from\nworking because the flex item refuses to shrink below its content width. Fix this by setting\n`min-width: 0` on the flex child:\n\n```css\n\u002F* WRONG — ellipsis will NOT trigger inside a flex container *\u002F\n.flex-parent {\n  display: flex;\n}\n.flex-parent > .label {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n\u002F* CORRECT — add min-width: 0 so the flex item can shrink *\u002F\n.flex-parent > .label {\n  min-width: 0; \u002F* ← this is the fix *\u002F\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n```\n\nThis pattern is used throughout Ganttee — for example, `.ganttee-icon-label-container` sets\n`min-width: 0` and `flex: 1` to allow label text to truncate.\n\n### Fixed vs Flexible Elements\n\nWhen a row has both fixed-size elements (icons, action buttons) and flexible text:\n\n```css\n.row {\n  display: flex;\n  align-items: center;\n}\n.row > .icon {\n  flex-shrink: 0; \u002F* icon never shrinks *\u002F\n  width: 16px;\n}\n.row > .label {\n  flex: 1; \u002F* label takes remaining space *\u002F\n  min-width: 0; \u002F* allows shrinking below content width *\u002F\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.row > .actions {\n  flex-shrink: 0; \u002F* action buttons never shrink *\u002F\n}\n```\n\nThis is the standard pattern for tree rows, list items, tab labels, and view pane headers.\n\n### Hover for Full Text\n\nWhen text is truncated with ellipsis, the **full text must be accessible** via hover tooltip. Use\n`IHoverService.setupDelayedHover()` with the full untruncated text so users can read it:\n\n```typescript\nthis._register(\n  this.hoverService.setupDelayedHover(labelElement, {\n    content: fullLabelText,\n  }),\n);\n```\n\nFor `IconLabel` and list\u002Ftree renderers, this is handled automatically. For custom DOM, you must add\nit manually.\n\n### Anti-Patterns (NEVER DO)\n\n- **Never** let text clip without an ellipsis — if `overflow: hidden` is set,\n  `text-overflow: ellipsis` must also be set.\n- **Never** rely on a fixed pixel width for text that could be localized — localized strings vary in\n  length.\n- **Never** use `text-overflow: ellipsis` without `overflow: hidden` and `white-space: nowrap` — all\n  three are required.\n- **Never** forget `min-width: 0` on flex children that need to truncate.\n- **Never** truncate text without providing a hover\u002Ftooltip for the full string.\n\n---\n\n## 8. Design-System Size Tokens (spacing, radius, font, codicon, stroke)\n\nGanttee is a standalone VS Code extension. Its webviews receive VS Code theme color variables, but\ndesign-system size variables are not injected. Follow the\n[design-token instructions](..\u002F..\u002Finstructions\u002Fdesign-tokens.instructions.md) for size-token\nfallbacks and use on-scale px values when a size variable is unavailable. Do not rely on VS Code\ncore source files or core-only style validation.\n\nThis section captures the **decision logic** for deeper styling tasks.\n\n### Spacing — `padding`, `margin`, `gap`\n\nScale (px): `0, 2, 4, 6, 8, 10, 12, 16, 20, 24, 28, 32, 36, 40` → `--vscode-spacing-sizeNone`,\n`--vscode-spacing-size20` … `--vscode-spacing-size400` (token number = px × 10, so `size200` =\n20px).\n\n**What matters is the value, not the token.** Adopting the `var()` is optional — a raw px value is\nfine **as long as it lands on the scale**. What breaks rhythm is an **off-scale** value (3, 5, 7,\n14, 26px…). Snap off-scale values to the nearest scale value, **ties round up** (`5px → 6px`,\n`3px → 4px`, `1px → 2px`, `26px → 28px`). Each length of a shorthand is checked independently\n(`0 5px → 0 6px`). Leave `auto`, `%`, `em`\u002F`rem`, `var()`\u002F`calc()` untouched.\n\n### Corner radius — `border-radius`\n\n| px   | Variable                       | Use                         |\n| ---- | ------------------------------ | --------------------------- |\n| 2    | `--vscode-cornerRadius-xSmall` | very compact elements       |\n| 4    | `--vscode-cornerRadius-small`  | controls (buttons, inputs)  |\n| 6    | `--vscode-cornerRadius-medium` | base \u002F inner surfaces       |\n| 8    | `--vscode-cornerRadius-large`  | prominent \u002F outer surfaces  |\n| 12   | `--vscode-cornerRadius-xLarge` | very prominent surfaces     |\n| 9999 | `--vscode-cornerRadius-circle` | fully rounded (pills, dots) |\n\n**Snap map** for off-scale literals (ties round **up**): `2→xSmall`, `3,4→small`, `5,6→medium`,\n`7,8→large`, `10,11,12→xLarge`, `14,16,18,20→xLarge`, `999→circle`.\n\n- **Pills** (radius ≈ half the element height — e.g. `28h`\u002F`14r`, `36h`\u002F`18r`, `22×22`\u002F`11r`) →\n  `--vscode-cornerRadius-circle`, **not** xLarge. The literal-nearest token would square them and\n  lose the fully-rounded intent.\n- **Leave untouched:** `50%`, `0`, `0px`, `inherit`, any `calc()`\u002F`var()`. Preserve `!important`.\n\n### Font size & weight\n\nGeneric UI ramp — pair a **size** token with a **weight** token (mirrors the agents ramp; \"Strong\" =\nmatching size token + `semiBold`, never a separate size):\n\n| px  | Size var                     | Weight   |\n| --- | ---------------------------- | -------- |\n| 26  | `--vscode-fontSize-heading1` | semiBold |\n| 18  | `--vscode-fontSize-heading2` | semiBold |\n| 13  | `--vscode-fontSize-heading3` | semiBold |\n| 13  | `--vscode-fontSize-body1`    | regular  |\n| 11  | `--vscode-fontSize-body2`    | regular  |\n| 12  | `--vscode-fontSize-label1`   | regular  |\n| 11  | `--vscode-fontSize-label2`   | regular  |\n| 10  | `--vscode-fontSize-label3`   | regular  |\n\nGeneric weights: `--vscode-fontWeight-regular` (400), `--vscode-fontWeight-semiBold` (600).\n\n**Deprecated** — `--vscode-bodyFontSize` (13) → `--vscode-fontSize-body1`,\n`--vscode-bodyFontSize-small` (12) → `--vscode-fontSize-label1`, `--vscode-bodyFontSize-xSmall` (11)\n→ `--vscode-fontSize-body2`.\n\nAgents window (`src\u002Fvs\u002Fsessions\u002F**`) ramp — identical values, `agents-`-prefixed:\n\n| px  | Size var                            | Weight   |\n| --- | ----------------------------------- | -------- |\n| 26  | `--vscode-agents-fontSize-heading1` | semiBold |\n| 18  | `--vscode-agents-fontSize-heading2` | semiBold |\n| 13  | `--vscode-agents-fontSize-heading3` | semiBold |\n| 13  | `--vscode-agents-fontSize-body1`    | regular  |\n| 11  | `--vscode-agents-fontSize-body2`    | regular  |\n| 12  | `--vscode-agents-fontSize-label1`   | regular  |\n| 11  | `--vscode-agents-fontSize-label2`   | regular  |\n| 10  | `--vscode-agents-fontSize-label3`   | regular  |\n\nBoth weight ramps are **two weights only**: `regular` (400) and `semiBold` (600) — generic\n`--vscode-fontWeight-*`, agents `--vscode-agents-fontWeight-*`.\n\n- **No medium (500).** `font-weight: 500` is off the ramp — snap to `semiBold`. Likewise\n  `700`\u002F`bold` → round to the nearer of 400\u002F600.\n- **\"Strong\" is not a separate size.** \"Body 1 Strong\" = the matching `--vscode-fontSize-*` (or\n  `--vscode-agents-fontSize-*`) size token + `semiBold`. Never add a strong _size_.\n- `normal` ≡ 400 → `regular`. Leave `inherit`, `lighter`, `bolder`, `var()`\u002F`calc()` untouched.\n\n### Codicon size — icon `font-size`\n\nCodicons are **only ever 16px or 12px** — never `14px` or any in-between value.\n\n| px  | Variable                           | Use                 |\n| --- | ---------------------------------- | ------------------- |\n| 16  | `--vscode-codiconFontSize` (base)  | default icon size   |\n| 12  | `--vscode-codiconFontSize-compact` | dense\u002Finline chrome |\n\n**Compact-glyph convention:** when sizing an icon at the compact 12px size, also swap the registered\nglyph to its `*Compact` variant (e.g. `Codicon.close` → `Codicon.closeCompact`, `Codicon.add` →\n`Codicon.addCompact`). CSS `font-size` alone only scales the icon — it does **not** change to the\nvisually-optimized compact glyph; that requires changing the registered icon (Action2 `icon:` \u002F\n`renderIcon`). **Only swap the glyph when no CSS selector targets the original glyph class** (e.g.\n`.codicon-close`); selectors keyed on the glyph class (`.codicon-add`, `.codicon-chevron-down`)\nbreak when the class becomes `-compact`, so update those selectors too (or size via a\nglyph-independent wrapper class like `.monaco-button`). Some icons (settings\u002Fsliders, agent, vm,\ninfo, lock, plus) have **no** compact variant — keep the regular glyph at 12px.\n\n### Stroke — border width\n\nA **single** stroke thickness: `1px` → `--vscode-strokeThickness`. Applies to the\n`border: 1px solid \u003Ccolor>` shorthand and `border-width: 1px`. Other widths have no token — leave\nthem.\n\n```css\n\u002F* prefer *\u002F\nborder: var(--vscode-strokeThickness) solid var(--vscode-widget-border);\n\u002F* avoid  *\u002F\nborder: 1px solid var(--vscode-widget-border);\n```\n\n---\n","This skill covers CSS file organization, naming, standard sizes, scrollable content, responsive\npatterns, and text overflow handling.\n\n---\n\n## 1. File Organization\n\nCSS files are **co-located** with their TypeScript components:\n\n```\nsrc\u002Fui\u002Fbutton\u002F\n    button.ts\n    button.css\nsrc\u002Fui\u002FmyFeature\u002F\n    myFeature.ts\n    media\u002F\n        myFeature.css\n```\n\nImport CSS directly in the TS file:\n\n```typescript\nimport \".\u002Fmedia\u002FmyFeature.css\";\n\u002F\u002F or for base widgets:\nimport \".\u002Fbutton.css\";\n```\n\nWorkbench-level global styles live in `src\u002Fvs\u002Fworkbench\u002Fbrowser\u002Fmedia\u002F`.\n\n## 2. Class Naming\n\n- **`ganttee-` prefix** for all major components: `.ganttee-workbench`, `.ganttee-split-view2`,\n  `.ganttee-scrollable-element`\n- **Modifier classes**: `.ganttee-split-view2.vertical`, `.ganttee-split-view2.horizontal`\n- **State classes**: `.visible`, `.focused`, `.active`, `.highlight`\n- Feature-specific classes use kebab-case without prefix: `.my-feature`, `.outline-pane`,\n  `.welcome-view-content`\n\n## 3. Standard Sizes\n\n| Element                      | Size                               |\n| ---------------------------- | ---------------------------------- |\n| Part title height            | 35px                               |\n| Title padding (horizontal)   | 8px                                |\n| Title label inner padding    | 12px                               |\n| Action area padding          | 5px                                |\n| Action icon size             | 16px                               |\n| Body font-size               | 13px (workbench), 11px (HTML body) |\n| Line height                  | 1.4em                              |\n| Validation message font-size | 12px (line-height: 17px)           |\n\n> For `padding`\u002F`margin`\u002F`gap`, `border-radius`, `font-size`\u002F`font-weight`, codicon size and border\n> width, prefer the design-system **size tokens** over raw px — see\n> [§8 Design-System Size Tokens](#8-design-system-size-tokens-spacing-radius-font-codicon-stroke).\n> Canonical reference: `.github\u002Finstructions\u002Fdesign-tokens.instructions.md` (auto-injected for\n> `src\u002Fvs\u002F**\u002F*.css`).\n\n## 4. CSS Selector Quality\n\n| Anti-pattern (flagged)                               | Correct pattern                |\n| ---------------------------------------------------- | ------------------------------ |\n| ID selectors for styling (`#my-widget`)              | Class selectors (`.my-widget`) |\n| Overly specific selectors                            | Minimal specificity needed     |\n| Styles in the wrong file                             | Co-located with the component  |\n| Missing `min-width: 0` on flex children              | Prevents truncation issues     |\n| Forgetting `pointer-events: none` on hidden overlays | Prevents click-through bugs    |\n\n## 5. Scrollable Content\n\nThree classes for different needs:\n\n| Class                     | When to Use                                            |\n| ------------------------- | ------------------------------------------------------ |\n| `SmoothScrollableElement` | Animated scrolling (SplitView, ListView)               |\n| `DomScrollableElement`    | Wrap existing DOM content (hovers, menus, breadcrumbs) |\n| `ScrollableElement`       | Basic single-direction scrollbar                       |\n\n```typescript\nconst scrollable = new DomScrollableElement(contentNode, {\n  horizontal: ScrollbarVisibility.Auto,\n  vertical: ScrollbarVisibility.Auto,\n});\nthis._register(scrollable);\ncontainer.appendChild(scrollable.getDomNode());\nscrollable.scanDomNode(); \u002F\u002F call after content changes\n```\n\n## 6. Responsive Layout\n\nVS Code (and so Ganttee) does **not** use CSS media queries. Instead, it uses a **programmatic\nconstraint-based layout system**:\n\n- `IView.minimumSize` \u002F `maximumSize` — views declare their size constraints.\n- `SplitView` and `Grid` distribute space according to constraints and `LayoutPriority`.\n- `ResizeObserver` is used for container-aware sizing (e.g., editor auto-layout).\n- The window is treated as a fixed viewport; space is distributed via sash-based resizing.\n\nWhen building a responsive component:\n\n1. Set `minimumSize` \u002F `maximumSize` appropriately.\n2. Use `LayoutPriority.Low` for panels that should collapse first.\n3. Use `snap: true` for panels that should snap closed when too small.\n4. Fire `onDidChange` when your constraints change dynamically.\n\n### Extension Webview Layout\n\n- Use CSS Grid or Flexbox in browser webviews.\n- Use media or container queries when the webview needs them.\n- Use `ResizeObserver` or the widget resize API for container-bound widgets such as ECharts.\n- Add `min-width: 0` and the ellipsis pattern to constrained flex or grid text.\n- Do not apply workbench `SplitView`, `Grid`, or no-media-query rules to browser webviews.\n\n### Extension Webview CSS\n\n- Use injected VS Code theme color variables.\n- Use on-scale pixels or feature-local CSS custom properties for size values.\n- Colocate CSS with its feature.\n- Use `.styles.ts` only with an adopted CSS-in-JS pipeline.\n\n## 7. Text Overflow & Ellipsis\n\nAll text labels that can be truncated by a resizable container **must** use the ellipsis pattern.\nClipped text without an ellipsis is a visual bug.\n\n### Standard Ellipsis Pattern (CSS)\n\nThe three-property combo is required — all three must be present:\n\n```css\n.my-label {\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n```\n\n### Common Locations That Need Ellipsis\n\n| Element                               | Why                                                  |\n| ------------------------------------- | ---------------------------------------------------- |\n| Part title labels (`h2`, breadcrumbs) | Sidebar\u002Fpanel can be resized narrower than the title |\n| View pane header titles               | View containers can be narrow                        |\n| List\u002Ftree row labels                  | Rows have a fixed width from the list container      |\n| Tab labels (editor tabs)              | Many tabs shrink to fit                              |\n| Button labels in welcome views        | Buttons have `max-width` constraints                 |\n| Status bar items                      | Many items compete for horizontal space              |\n| Notification message text             | Notification toast\u002Fcenter has fixed width            |\n| Tooltip\u002Fhover headings                | Hovers have max-width                                |\n| Dropdown\u002Fselect items                 | Select boxes have bounded width                      |\n| Badge text \u002F descriptions             | Auxiliary text in constrained columns                |\n\n### Flex Container Gotchas\n\nFlex children default to `min-width: auto`, which **prevents** `text-overflow: ellipsis` from\nworking because the flex item refuses to shrink below its content width. Fix this by setting\n`min-width: 0` on the flex child:\n\n```css\n\u002F* WRONG — ellipsis will NOT trigger inside a flex container *\u002F\n.flex-parent {\n  display: flex;\n}\n.flex-parent > .label {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n\u002F* CORRECT — add min-width: 0 so the flex item can shrink *\u002F\n.flex-parent > .label {\n  min-width: 0; \u002F* ← this is the fix *\u002F\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n```\n\nThis pattern is used throughout Ganttee — for example, `.ganttee-icon-label-container` sets\n`min-width: 0` and `flex: 1` to allow label text to truncate.\n\n### Fixed vs Flexible Elements\n\nWhen a row has both fixed-size elements (icons, action buttons) and flexible text:\n\n```css\n.row {\n  display: flex;\n  align-items: center;\n}\n.row > .icon {\n  flex-shrink: 0; \u002F* icon never shrinks *\u002F\n  width: 16px;\n}\n.row > .label {\n  flex: 1; \u002F* label takes remaining space *\u002F\n  min-width: 0; \u002F* allows shrinking below content width *\u002F\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.row > .actions {\n  flex-shrink: 0; \u002F* action buttons never shrink *\u002F\n}\n```\n\nThis is the standard pattern for tree rows, list items, tab labels, and view pane headers.\n\n### Hover for Full Text\n\nWhen text is truncated with ellipsis, the **full text must be accessible** via hover tooltip. Use\n`IHoverService.setupDelayedHover()` with the full untruncated text so users can read it:\n\n```typescript\nthis._register(\n  this.hoverService.setupDelayedHover(labelElement, {\n    content: fullLabelText,\n  }),\n);\n```\n\nFor `IconLabel` and list\u002Ftree renderers, this is handled automatically. For custom DOM, you must add\nit manually.\n\n### Anti-Patterns (NEVER DO)\n\n- **Never** let text clip without an ellipsis — if `overflow: hidden` is set,\n  `text-overflow: ellipsis` must also be set.\n- **Never** rely on a fixed pixel width for text that could be localized — localized strings vary in\n  length.\n- **Never** use `text-overflow: ellipsis` without `overflow: hidden` and `white-space: nowrap` — all\n  three are required.\n- **Never** forget `min-width: 0` on flex children that need to truncate.\n- **Never** truncate text without providing a hover\u002Ftooltip for the full string.\n\n---\n\n## 8. Design-System Size Tokens (spacing, radius, font, codicon, stroke)\n\nGanttee is a standalone VS Code extension. Its webviews receive VS Code theme color variables, but\ndesign-system size variables are not injected. Follow the\n[design-token instructions](..\u002F..\u002Finstructions\u002Fdesign-tokens.instructions.md) for size-token\nfallbacks and use on-scale px values when a size variable is unavailable. Do not rely on VS Code\ncore source files or core-only style validation.\n\nThis section captures the **decision logic** for deeper styling tasks.\n\n### Spacing — `padding`, `margin`, `gap`\n\nScale (px): `0, 2, 4, 6, 8, 10, 12, 16, 20, 24, 28, 32, 36, 40` → `--vscode-spacing-sizeNone`,\n`--vscode-spacing-size20` … `--vscode-spacing-size400` (token number = px × 10, so `size200` =\n20px).\n\n**What matters is the value, not the token.** Adopting the `var()` is optional — a raw px value is\nfine **as long as it lands on the scale**. What breaks rhythm is an **off-scale** value (3, 5, 7,\n14, 26px…). Snap off-scale values to the nearest scale value, **ties round up** (`5px → 6px`,\n`3px → 4px`, `1px → 2px`, `26px → 28px`). Each length of a shorthand is checked independently\n(`0 5px → 0 6px`). Leave `auto`, `%`, `em`\u002F`rem`, `var()`\u002F`calc()` untouched.\n\n### Corner radius — `border-radius`\n\n| px   | Variable                       | Use                         |\n| ---- | ------------------------------ | --------------------------- |\n| 2    | `--vscode-cornerRadius-xSmall` | very compact elements       |\n| 4    | `--vscode-cornerRadius-small`  | controls (buttons, inputs)  |\n| 6    | `--vscode-cornerRadius-medium` | base \u002F inner surfaces       |\n| 8    | `--vscode-cornerRadius-large`  | prominent \u002F outer surfaces  |\n| 12   | `--vscode-cornerRadius-xLarge` | very prominent surfaces     |\n| 9999 | `--vscode-cornerRadius-circle` | fully rounded (pills, dots) |\n\n**Snap map** for off-scale literals (ties round **up**): `2→xSmall`, `3,4→small`, `5,6→medium`,\n`7,8→large`, `10,11,12→xLarge`, `14,16,18,20→xLarge`, `999→circle`.\n\n- **Pills** (radius ≈ half the element height — e.g. `28h`\u002F`14r`, `36h`\u002F`18r`, `22×22`\u002F`11r`) →\n  `--vscode-cornerRadius-circle`, **not** xLarge. The literal-nearest token would square them and\n  lose the fully-rounded intent.\n- **Leave untouched:** `50%`, `0`, `0px`, `inherit`, any `calc()`\u002F`var()`. Preserve `!important`.\n\n### Font size & weight\n\nGeneric UI ramp — pair a **size** token with a **weight** token (mirrors the agents ramp; \"Strong\" =\nmatching size token + `semiBold`, never a separate size):\n\n| px  | Size var                     | Weight   |\n| --- | ---------------------------- | -------- |\n| 26  | `--vscode-fontSize-heading1` | semiBold |\n| 18  | `--vscode-fontSize-heading2` | semiBold |\n| 13  | `--vscode-fontSize-heading3` | semiBold |\n| 13  | `--vscode-fontSize-body1`    | regular  |\n| 11  | `--vscode-fontSize-body2`    | regular  |\n| 12  | `--vscode-fontSize-label1`   | regular  |\n| 11  | `--vscode-fontSize-label2`   | regular  |\n| 10  | `--vscode-fontSize-label3`   | regular  |\n\nGeneric weights: `--vscode-fontWeight-regular` (400), `--vscode-fontWeight-semiBold` (600).\n\n**Deprecated** — `--vscode-bodyFontSize` (13) → `--vscode-fontSize-body1`,\n`--vscode-bodyFontSize-small` (12) → `--vscode-fontSize-label1`, `--vscode-bodyFontSize-xSmall` (11)\n→ `--vscode-fontSize-body2`.\n\nAgents window (`src\u002Fvs\u002Fsessions\u002F**`) ramp — identical values, `agents-`-prefixed:\n\n| px  | Size var                            | Weight   |\n| --- | ----------------------------------- | -------- |\n| 26  | `--vscode-agents-fontSize-heading1` | semiBold |\n| 18  | `--vscode-agents-fontSize-heading2` | semiBold |\n| 13  | `--vscode-agents-fontSize-heading3` | semiBold |\n| 13  | `--vscode-agents-fontSize-body1`    | regular  |\n| 11  | `--vscode-agents-fontSize-body2`    | regular  |\n| 12  | `--vscode-agents-fontSize-label1`   | regular  |\n| 11  | `--vscode-agents-fontSize-label2`   | regular  |\n| 10  | `--vscode-agents-fontSize-label3`   | regular  |\n\nBoth weight ramps are **two weights only**: `regular` (400) and `semiBold` (600) — generic\n`--vscode-fontWeight-*`, agents `--vscode-agents-fontWeight-*`.\n\n- **No medium (500).** `font-weight: 500` is off the ramp — snap to `semiBold`. Likewise\n  `700`\u002F`bold` → round to the nearer of 400\u002F600.\n- **\"Strong\" is not a separate size.** \"Body 1 Strong\" = the matching `--vscode-fontSize-*` (or\n  `--vscode-agents-fontSize-*`) size token + `semiBold`. Never add a strong _size_.\n- `normal` ≡ 400 → `regular`. Leave `inherit`, `lighter`, `bolder`, `var()`\u002F`calc()` untouched.\n\n### Codicon size — icon `font-size`\n\nCodicons are **only ever 16px or 12px** — never `14px` or any in-between value.\n\n| px  | Variable                           | Use                 |\n| --- | ---------------------------------- | ------------------- |\n| 16  | `--vscode-codiconFontSize` (base)  | default icon size   |\n| 12  | `--vscode-codiconFontSize-compact` | dense\u002Finline chrome |\n\n**Compact-glyph convention:** when sizing an icon at the compact 12px size, also swap the registered\nglyph to its `*Compact` variant (e.g. `Codicon.close` → `Codicon.closeCompact`, `Codicon.add` →\n`Codicon.addCompact`). CSS `font-size` alone only scales the icon — it does **not** change to the\nvisually-optimized compact glyph; that requires changing the registered icon (Action2 `icon:` \u002F\n`renderIcon`). **Only swap the glyph when no CSS selector targets the original glyph class** (e.g.\n`.codicon-close`); selectors keyed on the glyph class (`.codicon-add`, `.codicon-chevron-down`)\nbreak when the class becomes `-compact`, so update those selectors too (or size via a\nglyph-independent wrapper class like `.monaco-button`). Some icons (settings\u002Fsliders, agent, vm,\ninfo, lock, plus) have **no** compact variant — keep the regular glyph at 12px.\n\n### Stroke — border width\n\nA **single** stroke thickness: `1px` → `--vscode-strokeThickness`. Applies to the\n`border: 1px solid \u003Ccolor>` shorthand and `border-width: 1px`. Other widths have no token — leave\nthem.\n\n```css\n\u002F* prefer *\u002F\nborder: var(--vscode-strokeThickness) solid var(--vscode-widget-border);\n\u002F* avoid  *\u002F\nborder: 1px solid var(--vscode-widget-border);\n```\n\n---\n",{"name":5,"description":7},"develop","3656175f11e1e311838b52d29a39d3173c74e3d8",".github\u002Fskills\u002Fux-css-layout",0,"https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee","https:\u002F\u002Fgithub.com\u002Fsergehas","2026-11-08 07:43:24",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add sergehas\u002Fganttee --skill ux-css-layout",{"tool":36,"command":37},"bunx","bunx skills add sergehas\u002Fganttee --skill ux-css-layout",{"tool":39,"command":40},"pnpm","pnpm dlx skills add sergehas\u002Fganttee --skill ux-css-layout","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Fux-css-layout\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M78GZ7BMMQP5DJ1AQ6355P0K","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M78GZ5SJJ8G7SB4VPERDM1B7","wait-what","Stop. That last message did not land: re-pitch it.","https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M78GYYTPF0Z3SY412PCND261","to-questionnaire","Turn a decision you can't fully answer into a questionnaire for someone else to fill in.","https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Fto-questionnaire\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M78GYVE71DN5EZ5ZFWTGFHZ2","tdd","Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.","https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M78GYQFC5GFHC544FYDZBVYV","spec-router","Detect which spec-lifecycle agent a request needs (drafting, reviewing, implementing, or test planning a feature spec) and suggest the handoff — never acts without confirmation. Use whenever a message mentions a spec\u002Ffeature-spec file, a roadmap status, or spec review\u002Fimplementation\u002F draft\u002Ftest-plan intent, even without an explicit @agent mention.","https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Fspec-router\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M78GYMM6QVMVC505BNVTB1WB","setup-skills","Configure this repo for the engineering skills: set up its issue tracker and domain doc layout. Run once before first use of the other engineering skills.","https:\u002F\u002Fgithub.com\u002Fsergehas\u002Fganttee\u002Fblob\u002Fdevelop\u002F.github\u002Fskills\u002Fsetup-skills\u002FSKILL.md",[],[]]