igniteui-cli 15.5.0 → 15.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/package.json +4 -4
  2. package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +6 -3
  3. package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
  4. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
  5. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
  6. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
  7. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
  8. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
  9. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
  10. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
  11. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
  12. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
  13. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
  14. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
  15. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
  16. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
  17. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
  18. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
  19. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
  20. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
  21. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
  22. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
  23. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
  24. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
  25. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +86 -0
  26. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +220 -0
  27. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
  28. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
  29. package/templates/react/igr-ts/projects/_base/files/src/main.tsx +1 -0
  30. package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +3 -3
  31. package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
  32. package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
  33. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
  34. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
  35. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
  36. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
  37. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
  38. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
  39. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
  40. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
  41. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
  42. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
  43. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
  44. package/templates/react/igr-ts/projects/side-nav/files/src/app/app.css +9 -9
  45. package/templates/react/igr-ts/projects/side-nav/files/src/app/home/style.module.css +7 -7
  46. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.css +8 -8
  47. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css +1 -69
  48. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx +5 -5
  49. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css +5 -26
  50. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css +0 -1
  51. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css +1 -56
  52. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx +2 -2
  53. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css +11 -11
  54. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx +1 -1
  55. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx +1 -1
  56. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx +1 -1
  57. package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.css +9 -9
  58. package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/style.module.css +7 -7
  59. package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.css +7 -7
  60. package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
  61. package/templates/webcomponents/igc-ts/constants.js +5 -5
  62. package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
  63. package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
  64. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
  65. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
  66. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
  67. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
  68. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
  69. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
  70. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
  71. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
  72. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
  73. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
  74. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
  75. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
  76. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
@@ -1,260 +1,132 @@
1
1
  ---
2
+ license: MIT
2
3
  name: igniteui-blazor-theming
3
- description: "Covers theming and visual customization for Ignite UI for Blazor: choosing and switching built-in themes (Bootstrap, Material, Fluent, Indigo - light and dark variants), customizing component appearance with CSS custom properties (design tokens), using the igniteui-theming MCP server to generate component themes and palettes, applying custom palettes, setting roundness/spacing/sizing tokens globally, dark mode switching, scoped component theming, and CSS parts. Use when users ask about changing the look and feel of Ignite UI Blazor components, applying a color scheme, generating CSS variables, using CSS parts, or customizing design tokens. Do NOT use for grid data features or component configuration - use igniteui-blazor-grids or igniteui-blazor-components instead."
4
+ description: "Theming and visual customization for Ignite UI for Blazor: choosing and switching the built-in Bootstrap, Material, Fluent and Indigo themes in light or dark, scoping a theme to part of the page with IgbThemeProvider, generating palettes and component design tokens with the igniteui-theming MCP server, overriding CSS custom properties, using CSS shadow parts, dark mode, and global roundness/spacing/size tokens. Use when changing the look and feel of Ignite UI Blazor components, applying a color scheme, or writing component CSS. For component configuration use igniteui-blazor-components; for grid data features use igniteui-blazor-grids."
4
5
  user-invocable: true
5
6
  ---
6
7
 
7
- # Ignite UI for Blazor - Theming and Styling
8
+ # Ignite UI for Blazor - Theming & Styling
8
9
 
9
- ## Description
10
+ Blazor theming is **CSS-first**: a built-in theme stylesheet plus CSS custom properties. There is no Sass step. Ignite UI components render as web components with `igc-*` tag names, so every CSS selector targets `igc-button`, never `IgbButton`.
10
11
 
11
- This skill teaches AI agents how to theme Ignite UI for Blazor applications using built-in CSS theme files, CSS custom properties, CSS shadow parts, and the **Ignite UI Theming MCP server**. It covers theme switching, palette generation, component-level design tokens, global layout tokens, and scoped CSS customization.
12
+ ## How to use this skill
12
13
 
13
- ## Prerequisites
14
+ 1. Identify the layer you need to change — the table below.
15
+ 2. For anything version-specific (palette variables, component token names, layout token CSS), call the `igniteui-theming` MCP tools rather than writing names from memory. Token names are not guessable from component names.
16
+ 3. Read [`references/common-patterns.md`](./references/common-patterns.md) for theme switching, dark mode, scoped overrides, and `::part()` recipes.
14
17
 
15
- - A Blazor project using Ignite UI for Blazor components
16
- - A theme CSS file and `_content/IgniteUI.Blazor/app.bundle.js` runtime script linked in the host page (see [`references/common-patterns.md`](./references/common-patterns.md))
17
- - The **Ignite UI Theming MCP server** (`igniteui-theming`) available as a tool provider
18
+ **Without the MCP server this skill still works** for theme selection, `IgbThemeProvider`, dark mode, and CSS structure. What it cannot give you is the exact set of `--ig-<component>-<token>` names — in that case say the token list was not verified, or read the generated theme CSS in `_content/IgniteUI.Blazor/themes/` to confirm. Do not configure MCP unprompted; see [MCP server (optional)](#mcp-server-optional).
18
19
 
19
- > **AGENT INSTRUCTION - MCP Server Setup (REQUIRED)**
20
- >
21
- > Before using any theming tools, you MUST verify the MCP server is available
22
- > by calling any lightweight theming MCP tool.
23
- > This skill is already scoped to Ignite UI for Blazor, so use `platform: "blazor"`
24
- > in theming tool calls. If the theming tool is not available or the call fails,
25
- > you MUST automatically configure it by following the setup process steps described below.
26
- >
27
- > After writing the file, inform the user that the MCP server has been
28
- > configured and they may need to reload the editor for the tools to activate.
29
- > Start the MCP server and wait for that MCP server to start before continuing the theming related work.
30
- > Do NOT skip this step or ask the user to do it manually.
31
-
32
- ## Setting Up the Theming MCP Server
33
-
34
- > **Full setup instructions for VS Code, Cursor, Claude Desktop, and JetBrains IDEs are in [`references/mcp-setup.md`](./references/mcp-setup.md).** Read that file for editor-specific configuration steps and verification.
35
-
36
- ## Theming Architecture
37
-
38
- | Layer | Purpose |
20
+ | Layer | Mechanism |
39
21
  |---|---|
40
- | Built-in theme CSS | Baseline Bootstrap, Material, Fluent, or Indigo styling in light/dark variants |
41
- | Palette tokens | Global color CSS variables used across components |
42
- | Component design tokens | Component-scoped CSS custom properties generated or discovered with MCP |
43
- | CSS shadow parts | Fine-grained internal element styling only when the component doc lists supported parts |
44
- | Layout tokens | Global roundness, spacing, and size controls generated by MCP tools |
45
-
46
- Ignite UI for Blazor theming in this skill is CSS-first. Agents should generate or edit CSS custom properties and selectors for normal app styling.
47
-
48
- ## Built-In Themes
49
-
50
- Use built-in theme CSS files for the baseline visual system. Supported design systems are Bootstrap, Material, Fluent, and Indigo, with light and dark variants.
51
-
52
- Confirm exact file paths in [`references/common-patterns.md`](./references/common-patterns.md) before writing host-page markup. Only one built-in theme CSS file should be active at a time.
53
-
54
- ## Color Palettes
55
-
56
- Use `create_palette(platform: "blazor", output: "css", ...)` for a generated palette from seed colors. Use `create_custom_palette(platform: "blazor", output: "css", ...)` only when the user needs explicit control over individual shade values.
57
-
58
- Palette CSS belongs in `:root` and must be loaded after the Ignite UI built-in theme CSS.
59
-
60
- For simple palette references, use `get_color` instead of writing color variable names from memory:
61
-
62
- ```
63
- get_color(color: "primary", variant: "600")
64
- ```
65
-
66
- Use `contrast: true` when you need the matching text color token.
67
-
68
- Raw color values are acceptable in the initial palette seed call. After the palette exists, component themes and custom CSS should use palette CSS custom properties wherever the desired color belongs to the theme.
22
+ | Baseline look | One built-in theme stylesheet: Bootstrap, Material, Fluent, Indigo × light, dark |
23
+ | Theme for a page region | `IgbThemeProvider` component |
24
+ | Global colors | Palette CSS custom properties in `:root` (`create_palette`) |
25
+ | One component's appearance | Component design tokens (`get_component_design_tokens` → `create_component_theme`) |
26
+ | Internal parts a token doesn't cover | `::part()` — only after confirming the part name |
27
+ | Global density | `set_roundness`, `set_spacing`, `set_size` |
69
28
 
70
- Palette shades: chromatic shades use `50` as the lightest shade and `900` as the darkest shade. Do not invert chromatic colors for dark themes; only gray is inverted for dark variants.
71
-
72
- Surface color must match the variant: use a light surface for `variant: "light"` and a dark surface for `variant: "dark"`.
73
-
74
- ## Component-Level Theming
75
-
76
- For component styling, first call `get_component_design_tokens(component: "...")`, then call `create_component_theme(platform: "blazor", component: "...", tokens: {...}, output: "css")` or write CSS using the returned token names. Do not use `overrides`; the MCP argument is `tokens`.
77
-
78
- For components with variants, query the exact variant whenever possible. For example, use `contained-button`, `flat-button`, `outlined-button`, or `fab-button` instead of generic `button` before generating a component theme.
79
-
80
- Use palette token references such as `var(--ig-primary-500)` and `var(--ig-primary-500-contrast)` after a palette has been established. Do not pass raw hex/RGB/HSL values to component theme tokens unless the value is intentionally outside the theme palette.
81
-
82
- For CSS parts, call the component's Blazor `get_doc` entry first. Do not say a component exposes CSS parts unless the Blazor doc confirms the exact part names.
83
-
84
- ### Discovering Available Tokens
85
-
86
- Each component has its own set of design tokens. Before theming a component, call `get_component_design_tokens` and use only token names returned by the tool.
87
-
88
- ### Compound Components
89
-
90
- Some components are compound and may involve internally themed child components. When `get_component_design_tokens` returns compound guidance, follow the checklist from the tool response.
91
-
92
- For standard compound components, generate the related themes listed by the tool and scope them under the parent component selector. For composed compound components, use only the primary parent tokens unless the user explicitly requests a specific refinement token.
93
-
94
- ## Layout Controls
95
-
96
- Use MCP layout tools for global or scoped layout changes:
97
-
98
- | Goal | MCP tool | Required value shape |
99
- |---|---|---|
100
- | Roundness | `set_roundness` | `radiusFactor: 0..1` |
101
- | Spacing | `set_spacing` | `spacing: number` plus optional `inline` / `block` |
102
- | Size | `set_size` | `size: "small" | "medium" | "large"` |
29
+ ## Built-in themes
103
30
 
104
- Do not use legacy size names such as `compact`, `cosy`, or `comfortable` for Blazor theming tools.
31
+ Link exactly **one** stylesheet in the host page; loading two conflicts.
105
32
 
106
- ## Using the Theming MCP Server
107
-
108
- The Ignite UI Theming MCP server provides code generation and reference tools for Blazor-ready CSS custom properties. Agents can see tool schemas directly, so this section only records the Ignite UI for Blazor theming workflow and product-specific constraints.
109
-
110
- > **IMPORTANT - File Safety Rule**: When generating or updating theme code, **never overwrite existing style files directly**. Instead, propose the changes as an update and let the user review and approve before writing to disk. If an `app.css`, `site.css`, `.razor.css`, or other target style file already exists, show the generated code as a diff or suggestion rather than replacing the file contents. This prevents accidental loss of custom styles the user has already written.
111
-
112
- Always follow this workflow:
113
-
114
- ### Step 1 - Verify Blazor Theming Context
115
-
116
- ```
117
- Tool: read_resource
118
- Params: { uri: "theming://platforms/blazor" }
33
+ ```html
34
+ <link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />
35
+ <link href="css/app.css" rel="stylesheet" /> <!-- your overrides, after -->
36
+ <script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
119
37
  ```
120
38
 
121
- Use this as the lightweight availability check and platform reference for Blazor theming tasks.
39
+ Paths are `_content/IgniteUI.Blazor/themes/{light|dark}/{bootstrap|material|fluent|indigo}.css`. Any full-featured grid needs the grid stylesheet in the same variant as well (`themes/grid/light/bootstrap.css`); `IgbGridLite` uses its own package path instead.
122
40
 
123
- ### Step 2 - Generate a Palette
41
+ ## Scoped theming with `IgbThemeProvider`
124
42
 
125
- > **Note:** For Blazor (CSS-first, no Sass pipeline), use `create_palette` with `output: "css"` to get CSS custom properties directly. Do NOT use `create_theme` for Blazor - it always outputs Sass which requires a compilation step not present in standard Blazor projects. **Even passing `platform: "blazor"` to `create_theme` will still produce Sass output - the platform parameter does not change the output format.** The `create_palette` param names are `primary`/`secondary`/`surface` (not `primaryColor`/`secondaryColor`/`surfaceColor` - those belong to `create_theme`).
43
+ `IgbThemeProvider` applies a theme and variant to its subtree, overriding the global theme for those components. It is the built-in way to preview themes, theme one region differently, or switch theme at runtime without swapping stylesheets.
126
44
 
127
- ```
128
- Tool: create_palette
129
- Params: {
130
- platform: "blazor",
131
- output: "css",
132
- primary: "#3f51b5",
133
- secondary: "#e91e63",
134
- surface: "#ffffff",
135
- variant: "light"
136
- }
45
+ ```razor
46
+ <IgbThemeProvider Theme="Theme.Bootstrap" Variant="ThemeVariant.Dark">
47
+ <IgbCard>
48
+ <IgbCardHeader><h3 slot="title">Dark region</h3></IgbCardHeader>
49
+ <IgbCardContent><IgbButton>Sign In</IgbButton></IgbCardContent>
50
+ </IgbCard>
51
+ </IgbThemeProvider>
137
52
  ```
138
53
 
139
- For dark themes, use a dark surface color and `variant: "dark"`. Read `theming://guidance/colors/rules` first when surface or gray color choices are unclear.
54
+ `Theme`: `Material` (default), `Bootstrap`, `Indigo`, `Fluent`. `ThemeVariant`: `Light`, `Dark`. Register `IgbThemeProviderModule`. Bind the parameters to fields for a runtime theme switcher — no JS interop and no stylesheet juggling.
140
55
 
141
- ### Step 3 - Customize Individual Components
142
-
143
- ```
144
- Tool: get_component_design_tokens
145
- Params: { component: "contained-button" }
146
- ```
56
+ Use it when the change is scoped or interactive. Use a different stylesheet when the whole application should ship with one theme.
147
57
 
148
- Then generate CSS using only valid token names returned by the tool:
58
+ ## Palettes
149
59
 
150
60
  ```
151
- Tool: create_component_theme
152
- Params: {
153
- platform: "blazor",
154
- output: "css",
155
- component: "contained-button",
156
- tokens: {
157
- "background": "var(--ig-primary-500)",
158
- "foreground": "var(--ig-primary-500-contrast)"
159
- }
160
- }
61
+ create_palette(platform: "blazor", output: "css",
62
+ primary: "#3f51b5", secondary: "#e91e63",
63
+ surface: "#ffffff", variant: "light")
161
64
  ```
162
65
 
163
- Use `tokens`, not `overrides`. If the token discovery response distinguishes primary tokens from refinement tokens, use only the primary tokens unless the user explicitly requested the refined state or subpart.
164
-
165
- ### Step 4 - Adjust Global Layout Tokens
166
-
167
- ```
168
- Tool: set_roundness
169
- Params: { platform: "blazor", output: "css", radiusFactor: 0.5 }
66
+ - Use `create_palette` with `output: "css"`.
67
+ - The parameter names are `primary` / `secondary` / `surface` (the `primaryColor`-style names belong to `create_theme`).
68
+ - Use `create_custom_palette` only when the design needs explicit control over individual shades.
69
+ - Palette CSS belongs in `:root` in a stylesheet loaded **after** the built-in theme.
70
+ - Shades run `50` (lightest) to `900` (darkest). Do not invert chromatic colors for dark themes — only gray inverts.
71
+ - Surface must match the variant: light surface with `variant: "light"`, dark with `variant: "dark"`. Act on any luminance warning the tool returns.
72
+ - Raw hex belongs in the palette seed. After the palette exists, reference `var(--ig-primary-500)` and `var(--ig-primary-500-contrast)` downstream; `get_color(color: "primary", variant: "600")` resolves a token, with `contrast: true` for the matching text color.
170
73
 
171
- Tool: set_spacing
172
- Params: { platform: "blazor", output: "css", spacing: 1.25 }
74
+ ## Component design tokens
173
75
 
174
- Tool: set_size
175
- Params: { platform: "blazor", output: "css", size: "small" }
176
76
  ```
77
+ get_component_design_tokens(component: "contained-button")
177
78
 
178
- ### Step 5 - Apply Generated CSS
179
-
180
- Place generated CSS in an app stylesheet loaded after the Ignite UI theme CSS, such as `wwwroot/css/app.css`.
181
-
182
- ```html
183
- <link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />
184
- <link href="css/app.css" rel="stylesheet" />
185
- <script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
79
+ create_component_theme(platform: "blazor", output: "css", component: "contained-button",
80
+ tokens: { "background": "var(--ig-primary-500)",
81
+ "foreground": "var(--ig-primary-500-contrast)" })
186
82
  ```
187
83
 
188
- Palette and global layout CSS normally go in `:root`. Component theme CSS goes on the generated `igc-*` selector or under a scoped wrapper selector.
189
-
190
- In `.razor.css` isolation files, prefix `igc-*` selectors so Blazor CSS isolation does not block the override.
191
-
192
- ### Loading Reference Data
193
-
194
- Use `read_resource` with these URIs for preset values and documentation:
84
+ - **Always discover before you write.** Use only token names the tool returned.
85
+ - The argument is `tokens`, not `overrides`.
86
+ - Query the **exact variant** for variant-based components: `contained-button`, `flat-button`, `outlined-button`, `fab-button` — not plain `button`.
87
+ - If the response separates primary from refinement tokens, use the primary ones unless the user asked for a specific state or subpart.
88
+ - Compound components: follow the checklist in the tool's response. Standard compounds want the related child themes generated and scoped under the parent selector; composed compounds want only the parent's tokens.
89
+ - Charts, maps, gauges, and sparklines have **no** design tokens — style them through component parameters instead ([`charts.md`](../igniteui-blazor-components/references/charts.md)).
195
90
 
196
- | URI | Content |
197
- |---|---|
198
- | `theming://platforms/blazor` | Blazor platform specifics |
199
- | `theming://presets/palettes` | Preset palette colors |
200
- | `theming://guidance/colors/usage` | Which shades to use for which purpose |
201
- | `theming://guidance/colors/roles` | Semantic color roles |
202
- | `theming://guidance/colors/rules` | Light/dark theme color rules |
203
-
204
- ## Mandatory Agent Protocol
91
+ ## Global layout tokens
205
92
 
206
- > **DO NOT write CSS variable names, token names, or palette colors from memory.**
207
- > Design token names and values are version-specific and theme-specific. Anything generated without reading the reference files or querying the MCP theming server will produce incorrect CSS.
208
-
209
- You are required to complete all of the following steps before producing any theming-related code or answer:
93
+ | Goal | Tool | Value |
94
+ |---|---|---|
95
+ | Roundness | `set_roundness` | `radiusFactor: 0..1` |
96
+ | Spacing | `set_spacing` | `spacing: number`, optional `inline` / `block` |
97
+ | Size / density | `set_size` | `size: "small" \| "medium" \| "large"` |
210
98
 
211
- **Step 1 - Identify the theming task.**
212
- Map the user's request to one or more rows in the Task to Reference File table below.
99
+ All take `platform: "blazor"`, `output: "css"`, and their output goes in `:root`. Do not use the legacy names `compact` / `cosy` / `comfortable`.
213
100
 
214
- **Step 2 - Use the theming MCP tools for version-specific values.**
215
- For any task involving design token lookup, palette generation, component theme CSS, or global layout tokens, call the relevant Ignite UI Theming MCP tool. Do not infer token names, selector names, or palette variables from memory.
101
+ ## Where generated CSS goes
216
102
 
217
- **Step 3 - Read the relevant reference files in parallel.**
218
- Call `read_file` on all identified reference files in a single parallel batch.
103
+ - **Global stylesheet** (`wwwroot/css/app.css`) — use MCP output as-is, loaded after the built-in theme.
104
+ - **`.razor.css` isolation file** — prefix every `igc-*` selector with `::deep`, or CSS isolation blocks it. Never add `::deep` to a `:root {}` block or a plain HTML class selector.
105
+ - Palette and layout tokens go in `:root`; component themes go on the `igc-*` selector or a scoped wrapper.
219
106
 
220
- **Step 4 - Only then produce output.**
221
- Base CSS and instructions on what the MCP tools return and what the reference files say.
107
+ **Do not overwrite an existing stylesheet.** If `app.css`, `site.css`, or a `.razor.css` already exists, show the generated CSS as an addition for review rather than replacing the file — custom styles are easy to destroy and hard to recover.
222
108
 
223
- ### Task to Reference File
109
+ ## MCP server (optional)
224
110
 
225
- | Task | Reference file to read |
226
- |---|---|
227
- | Switching themes (light/dark/Bootstrap/Material/Fluent/Indigo), adding the CSS link, dark mode toggle, scoped theming | [`references/common-patterns.md`](./references/common-patterns.md) |
228
- | Setting up the MCP theming server in VS Code, Cursor, Claude Desktop, or JetBrains IDEs | [`references/mcp-setup.md`](./references/mcp-setup.md) |
111
+ `igniteui-theming` provides `create_palette`, `create_custom_palette`, `get_color`, `get_component_design_tokens`, `create_component_theme`, `set_roundness`, `set_spacing`, `set_size`, and `read_resource`. Always pass `platform: "blazor"` and `output: "css"` where accepted.
229
112
 
230
- ## Key Blazor Theming Notes
113
+ Reference resources: `theming://platforms/blazor`, `theming://presets/palettes`, `theming://guidance/colors/usage`, `theming://guidance/colors/roles`, `theming://guidance/colors/rules`.
231
114
 
232
- > **AGENT INSTRUCTION - CSS customization**
233
- >
234
- > For normal Ignite UI for Blazor app styling, generate CSS custom properties and selectors.
115
+ To enable the server, add to `.vscode/mcp.json` (VS Code, key `servers`):
235
116
 
236
- > **AGENT INSTRUCTION - CSS parts**
237
- >
238
- > Some Ignite UI Blazor components expose CSS shadow parts via `::part()`. Use `get_doc` for the component to confirm whether parts are available and to get the exact part names. Use `get_component_design_tokens` to get token names; do not infer token names or part names from Angular, React, or Web Components examples.
117
+ ```json
118
+ { "servers": { "igniteui-theming": { "command": "npx", "args": ["-y", "igniteui-theming", "igniteui-theming-mcp"] } } }
119
+ ```
239
120
 
240
- > **AGENT INSTRUCTION - Theming MCP server platform**
241
- >
242
- > This skill already establishes the platform. When calling Ignite UI Theming MCP tools that accept a platform, always pass `platform: "blazor"`.
121
+ Or `.cursor/mcp.json` / `claude_desktop_config.json` (key `mcpServers`):
243
122
 
244
- ## Key Rules
123
+ ```json
124
+ { "mcpServers": { "igniteui-theming": { "command": "npx", "args": ["-y", "igniteui-theming", "igniteui-theming-mcp"] } } }
125
+ ```
245
126
 
246
- 1. **Use `platform: "blazor"` and `output: "css"`** on theming tools that accept those parameters
247
- 2. **Always call `get_component_design_tokens` before component CSS overrides**; token names are not guessable from component names
248
- 3. **Use exact component variants** for variant components, such as `contained-button`, `flat-button`, `outlined-button`, and `fab-button`
249
- 4. **Use `tokens` with `create_component_theme`**; do not use an `overrides` object
250
- 5. **Use palette tokens after palette generation**; raw colors belong in palette seed inputs, not downstream component theme values
251
- 6. **Place generated CSS after the built-in Ignite UI theme CSS** so overrides win in the cascade
252
- 7. **Use `igc-*` selectors in CSS**, not Razor component names such as `IgbButton`
253
- 8. **Use `::part()` only after confirming part names with Blazor docs**, and prefer design tokens when a token exists
254
- 9. **Surface color must match the variant**; use a light surface for `light` and a dark surface for `dark`
255
- 10. **Only one built-in theme CSS file should be active at a time**; link only one theme stylesheet in the host page (e.g., `_content/IgniteUI.Blazor/themes/light/bootstrap.css`) to avoid conflicts
127
+ Reload the editor afterwards. JetBrains: **Settings → Tools → AI Assistant → MCP Servers**, command `npx`, arguments `igniteui-theming igniteui-theming-mcp`.
256
128
 
257
- ## Related Skills
129
+ ## Related skills
258
130
 
259
- - [`igniteui-blazor-components`](../igniteui-blazor-components/SKILL.md) - All non-grid UI components
260
- - [`igniteui-blazor-grids`](../igniteui-blazor-grids/SKILL.md) - Data Grids
131
+ - [`igniteui-blazor-components`](../igniteui-blazor-components/SKILL.md) — component APIs
132
+ - [`igniteui-blazor-grids`](../igniteui-blazor-grids/SKILL.md) — grid features and the `--ig-size` density scale