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.
- package/package.json +4 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +6 -3
- package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +86 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +220 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
- package/templates/react/igr-ts/projects/_base/files/src/main.tsx +1 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +3 -3
- package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
- package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app.css +9 -9
- package/templates/react/igr-ts/projects/side-nav/files/src/app/home/style.module.css +7 -7
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.css +8 -8
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css +1 -69
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx +5 -5
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css +5 -26
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css +0 -1
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css +1 -56
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx +2 -2
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css +11 -11
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx +1 -1
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx +1 -1
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx +1 -1
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.css +9 -9
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/style.module.css +7 -7
- package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.css +7 -7
- package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
- package/templates/webcomponents/igc-ts/constants.js +5 -5
- package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md
CHANGED
|
@@ -1,260 +1,132 @@
|
|
|
1
1
|
---
|
|
2
|
+
license: MIT
|
|
2
3
|
name: igniteui-blazor-theming
|
|
3
|
-
description: "
|
|
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
|
|
8
|
+
# Ignite UI for Blazor - Theming & Styling
|
|
8
9
|
|
|
9
|
-
|
|
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
|
-
|
|
12
|
+
## How to use this skill
|
|
12
13
|
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
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
|
-
|
|
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
|
-
|
|
31
|
+
Link exactly **one** stylesheet in the host page; loading two conflicts.
|
|
105
32
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
+
## Scoped theming with `IgbThemeProvider`
|
|
124
42
|
|
|
125
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
58
|
+
## Palettes
|
|
149
59
|
|
|
150
60
|
```
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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 `
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
-
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
**
|
|
218
|
-
|
|
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
|
-
**
|
|
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
|
-
|
|
109
|
+
## MCP server (optional)
|
|
224
110
|
|
|
225
|
-
|
|
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
|
-
|
|
113
|
+
Reference resources: `theming://platforms/blazor`, `theming://presets/palettes`, `theming://guidance/colors/usage`, `theming://guidance/colors/roles`, `theming://guidance/colors/rules`.
|
|
231
114
|
|
|
232
|
-
|
|
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
|
-
|
|
237
|
-
|
|
238
|
-
|
|
117
|
+
```json
|
|
118
|
+
{ "servers": { "igniteui-theming": { "command": "npx", "args": ["-y", "igniteui-theming", "igniteui-theming-mcp"] } } }
|
|
119
|
+
```
|
|
239
120
|
|
|
240
|
-
|
|
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
|
-
|
|
123
|
+
```json
|
|
124
|
+
{ "mcpServers": { "igniteui-theming": { "command": "npx", "args": ["-y", "igniteui-theming", "igniteui-theming-mcp"] } } }
|
|
125
|
+
```
|
|
245
126
|
|
|
246
|
-
|
|
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
|
|
129
|
+
## Related skills
|
|
258
130
|
|
|
259
|
-
- [`igniteui-blazor-components`](../igniteui-blazor-components/SKILL.md)
|
|
260
|
-
- [`igniteui-blazor-grids`](../igniteui-blazor-grids/SKILL.md) -
|
|
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
|