Skip to content

feat(builder): Rewrite svg.less imports in libraryLessGenerator - #1488

Open
stopcoder wants to merge 1 commit into
UI5:mainfrom
stopcoder:feat/svg-less-rewrite
Open

feat(builder): Rewrite svg.less imports in libraryLessGenerator#1488
stopcoder wants to merge 1 commit into
UI5:mainfrom
stopcoder:feat/svg-less-rewrite

Conversation

@stopcoder

@stopcoder stopcoder commented Jul 28, 2026

Copy link
Copy Markdown
Member

The libraryLessGenerator processor already rewrites base.less imports from the UI5 resource path (sap/ui/core/themes//base.less) to the theming-base-content path (Base/baseLib//base.less) used by the Theme Designer. Extend this to also rewrite svg.less imports to Base/icons//svg.less.

The Theme Designer resolves imports against the theming-base-content structure. When a customer creates a custom theme, icon overrides are stored under Base/icons/<custom_theme>/. The parent theme's library.less must import from the same Base/icons/ path so that custom content layered on top takes effect via LESS "last definition wins" semantics.

Extract a shared rewriteThemeDesignerImport() static method and drive both rewrites from a config array, so adding future rewrites is a one-liner.

JIRA: CPOUI5FRAMEWORK-812

Up-port of SAP/ui5-builder#1223

…LessGenerator

The libraryLessGenerator processor already rewrites base.less imports
from the UI5 resource path (sap/ui/core/themes/<theme>/base.less) to the
theming-base-content path (Base/baseLib/<theme>/base.less) used by the
Theme Designer. Extend this to also rewrite svg.less imports to
Base/icons/<theme>/svg.less.

The Theme Designer resolves imports against the theming-base-content
structure. When a customer creates a custom theme, icon overrides are
stored under Base/icons/<custom_theme>/. The parent theme's library.less
must import from the same Base/icons/ path so that custom content layered
on top takes effect via LESS "last definition wins" semantics.

Extract a shared rewriteThemeDesignerImport() static method and drive
both rewrites from a config array, so adding future rewrites is a
one-liner.
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.

1 participant