feat(builder): Rewrite svg.less imports in libraryLessGenerator - #1488
Open
stopcoder wants to merge 1 commit into
Open
feat(builder): Rewrite svg.less imports in libraryLessGenerator#1488stopcoder wants to merge 1 commit into
stopcoder wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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