.github/skills/update-component-styles/SKILL.md
Update component styling following the SCSS to Lit CSS workflow with proper theme support
npx skillsauth add igniteui/igniteui-webcomponents update-component-stylesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides you through updating component styles following the project's SCSS workflow and theming system.
Gather or confirm:
Component styles are organized as:
[component]/themes/[component].base.scss - Base structural styles[component]/themes/shared/[component].common.css.js - Common cross-theme styles (if exists)[component]/themes/shared/[component].bootstrap.scss - Bootstrap theme[component]/themes/shared/[component].material.scss - Material theme[component]/themes/shared/[component].fluent.scss - Fluent theme[component]/themes/shared/[component].indigo.scss - Indigo theme[component]/themes/light/[component].[theme].scss - Light theme overrides[component]/themes/dark/[component].[theme].scss - Dark theme overridesDecision tree:
Base styles (themes/[component].base.scss):
@use '../../../styles/utilities' as *;
:host {
display: block;
}
[part='base'] {
padding: 1rem;
border-radius: 4px;
// Structural styles here
}
Theme-specific styles (themes/shared/[component].bootstrap.scss):
@use '../../../../theming/functions' as *;
:host {
// Use theming functions from igniteui-theming
--component-color: #{color('primary', 500)};
}
[part='base'] {
background: var(--component-color);
}
Light/Dark overrides (themes/light/[component].bootstrap.scss):
:host {
--component-color: white;
}
If adding new styleable parts, update component render and JSDoc:
Update render method:
protected override render() {
return html`
<div part="base new-part">
<span part="content">Content</span>
</div>
`;
}
Update JSDoc:
/**
* ...
* @csspart base - The main container
* @csspart new-part - Description of new part
* @csspart content - The content wrapper
*/
export default class IgcComponentComponent extends LitElement {
For values that should be customizable:
In SCSS:
:host {
--component-padding: 1rem;
--component-radius: 4px;
}
[part='base'] {
padding: var(--component-padding);
border-radius: var(--component-radius);
}
Document in JSDoc:
/**
* ...
* @cssproperty --component-padding - The internal padding
* @cssproperty --component-radius - The border radius
*/
export default class IgcComponentComponent extends LitElement {
After editing SCSS files, transpile them:
npm run build:styles
This converts .scss to .css.js files with Lit's css template literal.
Verify: Check that .css.js files are updated with your changes.
Manual testing in Storybook:
npm run storybook
Check:
Automated testing (if style affects behavior):
it('should apply correct CSS class', async () => {
const el = await fixture<IgcComponentComponent>(
html`<igc-component variant="outlined"></igc-component>`
);
const part = el.shadowRoot?.querySelector('[part="base"]');
// Test computed styles or classes if critical
});
If adding new CSS parts or custom properties:
npm run build:styles)Problem: Style changes don't appear
Solution: Always run npm run build:styles after editing SCSS
Problem: Changes get overwritten on next build
Solution: Only edit .scss files, never .css.js files
Problem: Styles appear in some themes but not others Solution: Edit the correct theme file or shared file for all themes
Problem: Hardcoded colors don't match theme
Solution: Use color(), theme() functions from igniteui-theming
Problem: Users can't override styles Solution: Keep selector specificity low, expose CSS parts
Problem: Component doesn't display correctly
Solution: Always set :host { display: block; } or appropriate display value
See: src/components/badge/themes/
Structure:
base and icon partsSee: src/components/textarea/themes/
Structure:
From igniteui-theming package:
color($palette, $variant) - Get theme colorcontrast-color($color) - Get contrasting text colortheme($property) - Get theme value@use '../../../../theming/functions' as *;
:host {
--bg: #{color('surface', 500)};
--text: #{contrast-color(color('surface', 500))};
}
development
Step-by-step migration guide from igniteui-grid-lite (IgcGridLite) to the premium igniteui-webcomponents-grids (IgcGridComponent), covering every import, class name, HTML tag, property, event, template, sorting, filtering, and theming API change.
tools
Implement application views from design images using Ignite UI Web Components. Uses MCP servers (igniteui-cli, igniteui-theming) to discover components, generate themes, and follow best practices. Triggers when the user provides a design image (screenshot, mockup, wireframe) and wants it built as a working view with Ignite UI Web Components. Also triggers when the user asks to "implement this design", "build this UI", "convert this mockup", or "create a page from this image" in an Ignite UI Web Components project.
tools
Optimize application bundle size by importing only necessary components and using tree-shaking effectively
tools
Customize Ignite UI Web Components styling using CSS custom properties, optional Sass, and the igniteui-theming MCP server for AI-assisted theming