igniteui-angular 21.1.0-rc.4 → 21.1.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 (61) hide show
  1. package/README.md +29 -0
  2. package/fesm2022/igniteui-angular-grids-core.mjs +5 -3
  3. package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
  4. package/fesm2022/igniteui-angular-grids-grid.mjs +6 -1
  5. package/fesm2022/igniteui-angular-grids-grid.mjs.map +1 -1
  6. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +1 -0
  7. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs.map +1 -1
  8. package/fesm2022/igniteui-angular-grids-lite.mjs +2 -0
  9. package/fesm2022/igniteui-angular-grids-lite.mjs.map +1 -1
  10. package/fesm2022/igniteui-angular-simple-combo.mjs +1 -1
  11. package/fesm2022/igniteui-angular-simple-combo.mjs.map +1 -1
  12. package/lib/core/styles/components/grid/_grid-theme.scss +4 -1
  13. package/migrations/migration-collection.json +7 -0
  14. package/migrations/update-21_1_0_add-agent-skills/index.d.ts +3 -0
  15. package/migrations/update-21_1_0_add-agent-skills/index.js +46 -0
  16. package/package.json +4 -4
  17. package/skills/igniteui-angular-components/SKILL.md +71 -0
  18. package/skills/igniteui-angular-components/references/charts.md +447 -0
  19. package/skills/igniteui-angular-components/references/data-display.md +347 -0
  20. package/skills/igniteui-angular-components/references/directives.md +149 -0
  21. package/skills/igniteui-angular-components/references/feedback.md +141 -0
  22. package/skills/igniteui-angular-components/references/form-controls.md +298 -0
  23. package/skills/igniteui-angular-components/references/layout-manager.md +415 -0
  24. package/skills/igniteui-angular-components/references/layout.md +216 -0
  25. package/skills/igniteui-angular-components/references/setup.md +157 -0
  26. package/skills/igniteui-angular-grids/SKILL.md +110 -0
  27. package/skills/igniteui-angular-grids/references/data-operations.md +436 -0
  28. package/skills/igniteui-angular-grids/references/editing.md +480 -0
  29. package/skills/igniteui-angular-grids/references/features.md +218 -0
  30. package/skills/igniteui-angular-grids/references/paging-remote.md +388 -0
  31. package/skills/igniteui-angular-grids/references/state.md +448 -0
  32. package/skills/igniteui-angular-grids/references/structure.md +290 -0
  33. package/skills/igniteui-angular-grids/references/types.md +428 -0
  34. package/skills/igniteui-angular-theming/SKILL.md +530 -0
  35. package/styles/igniteui-angular-dark.css +1 -1
  36. package/styles/igniteui-angular.css +1 -1
  37. package/styles/igniteui-bootstrap-dark.css +1 -1
  38. package/styles/igniteui-bootstrap-light.css +1 -1
  39. package/styles/igniteui-dark-green.css +1 -1
  40. package/styles/igniteui-fluent-dark-excel.css +1 -1
  41. package/styles/igniteui-fluent-dark-word.css +1 -1
  42. package/styles/igniteui-fluent-dark.css +1 -1
  43. package/styles/igniteui-fluent-light-excel.css +1 -1
  44. package/styles/igniteui-fluent-light-word.css +1 -1
  45. package/styles/igniteui-fluent-light.css +1 -1
  46. package/styles/igniteui-indigo-dark.css +1 -1
  47. package/styles/igniteui-indigo-light.css +1 -1
  48. package/styles/maps/igniteui-angular-dark.css.map +1 -1
  49. package/styles/maps/igniteui-angular.css.map +1 -1
  50. package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
  51. package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
  52. package/styles/maps/igniteui-dark-green.css.map +1 -1
  53. package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
  54. package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
  55. package/styles/maps/igniteui-fluent-dark.css.map +1 -1
  56. package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
  57. package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
  58. package/styles/maps/igniteui-fluent-light.css.map +1 -1
  59. package/styles/maps/igniteui-indigo-dark.css.map +1 -1
  60. package/styles/maps/igniteui-indigo-light.css.map +1 -1
  61. package/types/igniteui-angular-grids-lite.d.ts +2 -0
@@ -0,0 +1,530 @@
1
+ ---
2
+ name: igniteui-angular-theming
3
+ description: "Customize Ignite UI components styling using the igniteui-theming MCP server for AI-assisted theming. Use when users ask to theme or restyle Ignite UI components, change the color palette, switch between light and dark themes, apply or generate a global theme, customize typography or elevations, or configure component-level styles."
4
+ user-invokable: true
5
+ ---
6
+
7
+ # Ignite UI for Angular — Theming Skill
8
+
9
+ ## Description
10
+
11
+ This skill teaches AI agents how to theme Ignite UI for Angular applications using the Sass-based theming system and the **Ignite UI Theming MCP server**. It covers global themes, palettes, typography, elevations, component-level theming, layout controls (spacing, sizing, roundness), and how to use the MCP tools for code generation.
12
+
13
+ ## Prerequisites
14
+
15
+ - An Angular project with `igniteui-angular` installed, **or** `@infragistics/igniteui-angular` for licensed users
16
+ - Sass support enabled in the project (default for Angular CLI projects)
17
+ - The **Ignite UI Theming MCP server** (`igniteui-theming`) available as a tool provider
18
+
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 `detect_platform`. If the tool is not available or the call fails,
23
+ > you MUST automatically configure it by following the setup process steps described below.
24
+ >
25
+ > After writing the file, inform the user that the MCP server has been
26
+ > configured and they may need to reload the editor for the tools to activate.
27
+ > Start the MCP server and wait for that MCP server to start before continuing the theming related work.
28
+ > Do NOT skip this step or ask the user to do it manually.
29
+
30
+ ## Setting Up the Theming MCP Server
31
+
32
+ The Ignite UI Theming MCP server enables AI assistants to generate production-ready theming code. It must be configured in your editor before the theming tools become available.
33
+
34
+ ### VS Code
35
+
36
+ Create or edit `.vscode/mcp.json` in your project:
37
+
38
+ ```json
39
+ {
40
+ "servers": {
41
+ "igniteui-theming": {
42
+ "command": "npx",
43
+ "args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ This works whether `igniteui-theming` is installed locally in `node_modules` or needs to be pulled from the npm registry — `npx -y` handles both cases.
50
+
51
+ ### Cursor
52
+
53
+ Create or edit `.cursor/mcp.json`:
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "igniteui-theming": {
59
+ "command": "npx",
60
+ "args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### Claude Desktop
67
+
68
+ Edit the Claude Desktop config file:
69
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
70
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
71
+
72
+ ```json
73
+ {
74
+ "mcpServers": {
75
+ "igniteui-theming": {
76
+ "command": "npx",
77
+ "args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
78
+ }
79
+ }
80
+ }
81
+ ```
82
+
83
+ ### WebStorm / JetBrains IDEs
84
+
85
+ 1. Go to **Settings → Tools → AI Assistant → MCP Servers**
86
+ 2. Click **+ Add MCP Server**
87
+ 3. Set Command to `npx` and Arguments to `igniteui-theming igniteui-theming-mcp`
88
+ 4. Click OK and restart the AI Assistant
89
+
90
+ ### Verifying the Setup
91
+
92
+ After configuring the MCP server, ask your AI assistant:
93
+
94
+ > "Detect which Ignite UI platform my project uses"
95
+
96
+ If the MCP server is running, the `detect_platform` tool will analyze your `package.json` and return the detected platform (e.g., `angular`).
97
+
98
+ ## Theming Architecture
99
+
100
+ > **Docs:** [Theming Overview](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/index) · [Palette](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/palettes) · [Typography](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/typography) · [Elevations](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/elevations)
101
+
102
+ The Ignite UI theming system is built on four pillars:
103
+
104
+ | Concept | Purpose |
105
+ |---|---|
106
+ | **Palette** | Color system with primary, secondary, surface, gray, info, success, warn, error families, each with shades 50–900 + accents A100–A700 |
107
+ | **Typography** | Font family, type scale (h1–h6, subtitle, body, button, caption, overline) |
108
+ | **Elevations** | Box-shadow levels 0–24 for visual depth |
109
+ | **Schema** | Per-component recipes mapping palette colors to component tokens |
110
+
111
+ ### Design Systems
112
+
113
+ Four built-in design systems are available:
114
+
115
+ - **Material** (default) — Material Design 3
116
+ - **Bootstrap** — Bootstrap-inspired
117
+ - **Fluent** — Microsoft Fluent Design
118
+ - **Indigo** — Infragistics Indigo Design
119
+
120
+ Each has light and dark variants (e.g., `$light-material-schema`, `$dark-fluent-schema`).
121
+
122
+ ## Pre-built Themes
123
+
124
+ The quickest way to theme an app is to include a pre-built CSS file in `angular.json`:
125
+
126
+ ```json
127
+ "styles": ["node_modules/igniteui-angular/styles/igniteui-angular.css"]
128
+ ```
129
+
130
+ > **Licensed package users:** replace `igniteui-angular` with `@infragistics/igniteui-angular` in the path:
131
+ > ```json
132
+ > "styles": ["node_modules/@infragistics/igniteui-angular/styles/igniteui-angular.css"]
133
+ > ```
134
+
135
+ Available pre-built CSS files:
136
+
137
+ | File | Theme |
138
+ |---|---|
139
+ | `igniteui-angular.css` | Material Light |
140
+ | `igniteui-angular-dark.css` | Material Dark |
141
+ | `igniteui-fluent-light.css` | Fluent Light |
142
+ | `igniteui-fluent-dark.css` | Fluent Dark |
143
+ | `igniteui-bootstrap-light.css` | Bootstrap Light |
144
+ | `igniteui-bootstrap-dark.css` | Bootstrap Dark |
145
+ | `igniteui-indigo-light.css` | Indigo Light |
146
+ | `igniteui-indigo-dark.css` | Indigo Dark |
147
+
148
+ All files are located under `node_modules/igniteui-angular/styles/` (or `node_modules/@infragistics/igniteui-angular/styles/` for the licensed package).
149
+
150
+ ## Custom Sass Theme (Manual)
151
+
152
+ > **AGENT INSTRUCTION — Sass Theming Docs**: If the user explicitly asks to build a Sass-based theme or configure Sass, refer to the dedicated Sass documentation:
153
+ > - [Sass Theming Overview](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass/index)
154
+ > - [Sass Configuration](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass/configuration)
155
+ > - [Sass Palettes](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass/palettes)
156
+ > - [Sass Component Themes](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass/component-themes)
157
+
158
+ Create a `styles.scss` file and include it in `angular.json`:
159
+
160
+ ```scss
161
+ // Open-source package
162
+ @use 'igniteui-angular/theming' as *;
163
+ // Licensed package — same Sass API, different import path
164
+ // @use '@infragistics/igniteui-angular/theming' as *;
165
+ $my-palette: palette(
166
+ $primary: #1976D2,
167
+ $secondary: #FF9800,
168
+ $surface: #FAFAFA
169
+ );
170
+
171
+ // 2. Typography (optional)
172
+ @include typography(
173
+ $font-family: $material-typeface,
174
+ $type-scale: $material-type-scale
175
+ );
176
+
177
+ // 3. Core reset & base styles
178
+ @include core();
179
+
180
+ // 4. Apply theme
181
+ @include theme(
182
+ $palette: $my-palette,
183
+ $schema: $light-material-schema
184
+ );
185
+ ```
186
+
187
+ For dark themes, use a dark surface color and a dark schema:
188
+
189
+ ```scss
190
+ $dark-palette: palette(
191
+ $primary: #90CAF9,
192
+ $secondary: #FFB74D,
193
+ $surface: #121212
194
+ );
195
+
196
+ @include theme(
197
+ $palette: $dark-palette,
198
+ $schema: $dark-material-schema
199
+ );
200
+ ```
201
+
202
+ ## Component-Level Theming
203
+
204
+ > **Docs:** [Component Themes](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass/component-themes)
205
+
206
+ Override individual component appearance using component theme functions and the `tokens` mixin.
207
+
208
+ > **AGENT INSTRUCTION — No Hardcoded Colors (CRITICAL)**
209
+ >
210
+ > Once a palette has been generated (via `palette()` in Sass or `create_palette` / `create_theme` via MCP),
211
+ > **every color reference MUST come from the generated palette tokens** — never hardcode hex/RGB/HSL values.
212
+ >
213
+ > Use `var(--ig-primary-500)`, `var(--ig-secondary-300)`, `var(--ig-surface-500)`, etc. in CSS,
214
+ > or the `get_color` MCP tool to obtain the correct token reference.
215
+ >
216
+ > **WRONG** (hardcoded hex — breaks theme switching, ignores the palette):
217
+ > ```scss
218
+ > $custom-avatar: avatar-theme(
219
+ > $background: #E91E63,
220
+ > $color: #FFFFFF
221
+ > );
222
+ > ```
223
+ >
224
+ > **RIGHT** (palette token — stays in sync with the theme):
225
+ > ```scss
226
+ > $custom-avatar: avatar-theme(
227
+ > $schema: $light-material-schema,
228
+ > $background: var(--ig-primary-500),
229
+ > $color: var(--ig-primary-500-contrast)
230
+ > );
231
+ > ```
232
+ >
233
+ > This applies to **all** style code: component themes, custom CSS rules, Sass variables used
234
+ > for borders/backgrounds/text, Angular `host` bindings, and inline styles.
235
+ > The only place raw hex values belong is the **initial `palette()` call** that seeds the color system.
236
+ > Everything downstream must reference the palette.
237
+
238
+ ```scss
239
+ @use 'igniteui-angular/theming' as *;
240
+
241
+ $custom-avatar: avatar-theme(
242
+ $schema: $light-material-schema,
243
+ $background: var(--ig-primary-500),
244
+ $color: var(--ig-primary-500-contrast)
245
+ );
246
+
247
+ igx-avatar {
248
+ @include tokens($custom-avatar);
249
+ }
250
+ ```
251
+
252
+ ### Discovering Available Tokens
253
+
254
+ Each component has its own set of design tokens (themeable CSS custom properties). Before theming a component, you must know which tokens exist. Use the **MCP tool** `get_component_design_tokens` to discover them.
255
+
256
+ ### Compound Components
257
+
258
+ Some components (e.g., `combo`, `grid`, `date-picker`, `select`) are **compound** — they contain internal child components, each requiring their own theme. For example, `date-picker` uses `calendar`, `flat-button`, and `input-group` internally.
259
+
260
+ Workflow for compound components:
261
+ 1. Call `get_component_design_tokens` for the parent (e.g., `date-picker`)
262
+ 2. The response lists related themes and scope selectors
263
+ 3. Call `create_component_theme` for each child, using the parent's selector as the wrapper
264
+
265
+ ## Layout Controls
266
+
267
+ ### Sizing
268
+
269
+ > **Docs:** [Display Density / Sizing](https://www.infragistics.com/products/ignite-ui-angular/angular/components/display-density)
270
+
271
+ Controls the size of components via `--ig-size` (values: 1 = small, 2 = medium, 3 = large):
272
+
273
+ ```css
274
+ /* Global */
275
+ :root { --ig-size: 2; }
276
+
277
+ /* Component-scoped */
278
+ igx-grid { --ig-size: 1; }
279
+ ```
280
+
281
+ ### Spacing
282
+
283
+ > **Docs:** [Spacing](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/spacing)
284
+
285
+ Controls internal padding via `--ig-spacing` (1 = default, 0.5 = compact, 2 = spacious):
286
+
287
+ ```css
288
+ :root { --ig-spacing: 1; }
289
+ .compact-section { --ig-spacing: 0.75; }
290
+ ```
291
+
292
+ ### Roundness
293
+
294
+ Controls border-radius via `--ig-radius-factor` (0 = square, 1 = maximum radius):
295
+
296
+ ```css
297
+ :root { --ig-radius-factor: 1; }
298
+ igx-avatar { --ig-radius-factor: 0.5; }
299
+ ```
300
+
301
+ ## Using the Theming MCP Server
302
+
303
+ The Ignite UI Theming MCP server provides tools for AI-assisted theme code generation.
304
+
305
+ > **IMPORTANT — File Safety Rule**: When generating or updating theme code, **never overwrite existing style files directly**. Instead, always **propose the changes as an update** and let the user review and approve before writing to disk. If a `styles.scss` (or any target 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.
306
+
307
+ Always follow this workflow:
308
+
309
+ ### Step 1 — Detect Platform
310
+
311
+ ```
312
+ Tool: detect_platform
313
+ ```
314
+ This auto-detects `angular` from `package.json` and sets the correct import paths.
315
+
316
+ ### Step 2 — Generate a Full Theme
317
+
318
+ ```
319
+ Tool: create_theme
320
+ Params: {
321
+ platform: "angular",
322
+ designSystem: "material",
323
+ primaryColor: "#1976D2",
324
+ secondaryColor: "#FF9800",
325
+ surfaceColor: "#FAFAFA",
326
+ variant: "light",
327
+ fontFamily: "'Roboto', sans-serif",
328
+ includeTypography: true,
329
+ includeElevations: true
330
+ }
331
+ ```
332
+
333
+ Generates a complete Sass file with palette, typography, elevations, and the `theme()` mixin call.
334
+
335
+ ### Step 3 — Customize Individual Components
336
+
337
+ ```
338
+ Tool: get_component_design_tokens
339
+ Params: { component: "grid" }
340
+ ```
341
+
342
+ Then use **palette token references** (not hardcoded hex values) for every color:
343
+
344
+ ```
345
+ Tool: create_component_theme
346
+ Params: {
347
+ platform: "angular",
348
+ designSystem: "material",
349
+ variant: "light",
350
+ component: "grid",
351
+ tokens: {
352
+ "header-background": "var(--ig-primary-50)",
353
+ "header-text-color": "var(--ig-primary-800)"
354
+ }
355
+ }
356
+ ```
357
+
358
+ > **Reminder**: After a palette is generated, all token values passed to
359
+ > `create_component_theme` must reference palette CSS custom properties
360
+ > (e.g., `var(--ig-primary-500)`, `var(--ig-secondary-A200)`,
361
+ > `var(--ig-gray-100)`). Never pass raw hex values like `"#E3F2FD"`.
362
+
363
+ ### Step 4 — Generate a Palette
364
+
365
+ For simple mid-luminance base colors:
366
+
367
+ ```
368
+ Tool: create_palette
369
+ Params: {
370
+ platform: "angular",
371
+ primary: "#1976D2",
372
+ secondary: "#FF9800",
373
+ surface: "#FAFAFA",
374
+ variant: "light"
375
+ }
376
+ ```
377
+
378
+ For brand-specific exact shade values, use `create_custom_palette` with `mode: "explicit"` for full control over each shade.
379
+
380
+ ### Step 5 — Adjust Layout
381
+
382
+ ```
383
+ Tool: set_size → { size: "medium" }
384
+ Tool: set_spacing → { spacing: 0.75, component: "grid" }
385
+ Tool: set_roundness → { radiusFactor: 0.8 }
386
+ ```
387
+
388
+ ### Step 6 — Reference Palette Colors (MANDATORY for All Color Usage)
389
+
390
+ After a palette is generated, **always** use the `get_color` tool to obtain the correct CSS custom property reference. Never hardcode hex/RGB/HSL values in component themes, custom CSS, or Sass variables.
391
+
392
+ ```
393
+ Tool: get_color
394
+ Params: { color: "primary", variant: "600" }
395
+ → var(--ig-primary-600)
396
+
397
+ Params: { color: "primary", variant: "600", contrast: true }
398
+ → var(--ig-primary-600-contrast)
399
+
400
+ Params: { color: "primary", opacity: 0.5 }
401
+ → hsl(from var(--ig-primary-500) h s l / 0.5)
402
+ ```
403
+
404
+ Use these token references everywhere:
405
+ - Component theme `tokens` values
406
+ - Custom CSS rules (`color`, `background`, `border-color`, `fill`, `stroke`, etc.)
407
+ - Sass variables for derived values (`$sidebar-bg: var(--ig-surface-500);`)
408
+ - Angular `host` style bindings
409
+
410
+ The **only** place raw hex values are acceptable is in the initial `palette()` call or the `create_palette` / `create_theme` MCP tool inputs that seed the color system.
411
+
412
+ ### Loading Reference Data
413
+
414
+ Use `read_resource` with these URIs for preset values and documentation:
415
+
416
+ | URI | Content |
417
+ |---|---|
418
+ | `theming://presets/palettes` | Preset palette colors |
419
+ | `theming://presets/typography` | Typography presets |
420
+ | `theming://presets/elevations` | Elevation shadow presets |
421
+ | `theming://guidance/colors/usage` | Which shades for which purpose |
422
+ | `theming://guidance/colors/roles` | Semantic color roles |
423
+ | `theming://guidance/colors/rules` | Light/dark theme rules |
424
+ | `theming://platforms/angular` | Angular platform specifics |
425
+
426
+ ## Referencing Colors in Custom Styles
427
+
428
+ After a theme is applied, the palette is available as CSS custom properties on `:root`. Use these tokens in all custom CSS — never introduce standalone hex/RGB variables for colors that the palette already provides.
429
+
430
+ ### Correct: Palette Tokens
431
+
432
+ ```scss
433
+ // All colors come from the theme — respects palette changes and dark/light switching
434
+ .sidebar {
435
+ background: var(--ig-surface-500);
436
+ color: var(--ig-gray-900);
437
+ border-right: 1px solid var(--ig-gray-200);
438
+ }
439
+
440
+ .accent-badge {
441
+ background: var(--ig-secondary-500);
442
+ color: var(--ig-secondary-500-contrast);
443
+ }
444
+
445
+ .hero-section {
446
+ // Semi-transparent primary overlay
447
+ background: hsl(from var(--ig-primary-500) h s l / 0.12);
448
+ }
449
+ ```
450
+
451
+ ### Incorrect: Hardcoded Values
452
+
453
+ ```scss
454
+ // WRONG — these break when the palette changes and ignore dark/light mode
455
+ $primary-color: #00838F; // ✗ hardcoded
456
+ $secondary-color: #3D5AFE; // ✗ hardcoded
457
+ $surface-color: #F0F5FA; // ✗ hardcoded
458
+
459
+ .sidebar {
460
+ background: $surface-color; // ✗ not a palette token
461
+ color: #333; // ✗ not a palette token
462
+ }
463
+ ```
464
+
465
+ ### When Raw Hex Values Are OK
466
+
467
+ Raw hex values are acceptable **only** in these contexts:
468
+
469
+ 1. **`palette()` call** — the initial seed colors that generate the full palette
470
+ 2. **`create_palette` / `create_theme` MCP tool inputs** — the base colors passed to the tool
471
+ 3. **Non-palette decorative values** — e.g., a one-off SVG illustration color that intentionally stays fixed regardless of theme
472
+
473
+ Everything else must use `var(--ig-<family>-<shade>)` tokens.
474
+
475
+ ## Common Patterns
476
+
477
+ ### Switching Between Light and Dark Themes
478
+
479
+ ```scss
480
+ @use 'igniteui-angular/theming' as *;
481
+
482
+ $light-palette: palette($primary: #1976D2, $secondary: #FF9800, $surface: #FAFAFA);
483
+ $dark-palette: palette($primary: #90CAF9, $secondary: #FFB74D, $surface: #121212);
484
+
485
+ @include core();
486
+ @include typography($font-family: $material-typeface, $type-scale: $material-type-scale);
487
+
488
+ // Light is default
489
+ @include theme($palette: $light-palette, $schema: $light-material-schema);
490
+
491
+ // Dark via class on <body> or <html>
492
+ .dark-theme {
493
+ @include theme($palette: $dark-palette, $schema: $dark-material-schema);
494
+ }
495
+ ```
496
+
497
+ ### Scoping a Theme to a Container
498
+
499
+ ```scss
500
+ .admin-panel {
501
+ @include theme($palette: $admin-palette, $schema: $light-indigo-schema);
502
+ }
503
+ ```
504
+
505
+ ### Licensed Package Users
506
+
507
+ If using the licensed `@infragistics/igniteui-angular` package, set `licensed: true` on MCP tool calls and change the Sass import:
508
+
509
+ ```scss
510
+ @use '@infragistics/igniteui-angular/theming' as *;
511
+ ```
512
+
513
+ ## Key Rules
514
+
515
+ 1. **Never overwrite existing files directly** — always propose theme code as an update for user review; do not replace existing style files without confirmation
516
+ 2. **Always call `detect_platform` first** when using MCP tools
517
+ 3. **Always call `get_component_design_tokens` before `create_component_theme`** to discover valid token names
518
+ 4. **Palette shades 50 = lightest, 900 = darkest** for all chromatic colors — never invert for dark themes (only gray inverts)
519
+ 5. **Surface color must match the variant** — light color for `light`, dark color for `dark`
520
+ 6. **Use `@include core()` once** before `@include theme()` in your global styles
521
+ 7. **Component themes use `@include tokens($theme)`** inside a selector to emit CSS custom properties
522
+ 8. **For compound components**, follow the full checklist returned by `get_component_design_tokens` — theme each child component with its scoped selector
523
+ 9. **Never hardcode colors after palette generation** — once a palette is created, every color in component themes, custom CSS, and Sass variables must use `var(--ig-<family>-<shade>)` palette tokens (e.g., `var(--ig-primary-500)`, `var(--ig-gray-200)`). Raw hex/RGB/HSL values are only acceptable in the initial `palette()` seed call. This ensures themes remain consistent, switchable (light/dark), and maintainable
524
+
525
+ ## Related Skills
526
+
527
+ - [`igniteui-angular-components`](../igniteui-angular-components/SKILL.md) — Form controls, application setup, architecture, and import patterns
528
+ - [`igniteui-angular-components-layout`](../igniteui-angular-components-layout/SKILL.md) — Layout, data display, feedback/overlay components, and directives
529
+ - [`igniteui-angular-grids`](../igniteui-angular-grids/SKILL.md) — Data Grid structure, column configuration, sorting, filtering, selection
530
+ - [`igniteui-angular-grids-types`](../igniteui-angular-grids-types/SKILL.md) — Tree Grid, Hierarchical Grid, Grid Lite, Pivot Grid specifics