Skip to content

Conversation

@nnaydenow
Copy link
Contributor

@nnaydenow nnaydenow commented Jan 19, 2026

Move component CSS variables from :root to :host.

To enable the new solution, pass options.cssVarsSchema with either global or local in your package-script options.

For RTL/LTR handling, use:

:dir(rtl | ltr)

For content density, use style queries (with the built-in Firefox polyfill):

@container style(--_ui5-compact-size: initial) {
	:host {
		...
	}
}

instead of:

[data-ui5-compact-size],
.ui5-content-density-compact,
.sapUiSizeCompact {
	...
}

For migrated packages, getScopedVarName is no longer required when adding or modifying CSS variables via JavaScript.

To do

  • Discuss nps option's name
  • Discuss system css variables' names
  • Retest everything. Cozy + Compact, Compact only

@ui5-webcomponents-bot
Copy link
Collaborator

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 19, 2026 14:12 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants