(all paths below are relative to the folder that contains this SKILL.md)
Prerequisites
overview-of-sap-theming-content-91ebfe2.mdexists; if not: fetch https://raw.githubusercontent.com/SAP-docs/btp-ui-theme-designer/main/docs/cf/About-Themes/overview-of-sap-theming-content-91ebfe2.md into that filetheming-base-content/exists; if not:git clone --depth 1 --filter=blob:none --no-checkout --sparse https://github.com/SAP/theming-base-content theming-base-content git -C theming-base-content sparse-checkout set content/ git -C theming-base-content checkout
The remaining framework repositories (openui5, webcomponents, fundamental-styles) are cloned lazily in step 3, only if the user's question targets them.
Context
Read references/theming-repository-layout.md for the layout of .theming files, the theme repository structure, and where each framework's themes live across theming-base-content, openui5, webcomponents, and fundamental-styles.
Procedure
-
Read
overview-of-sap-theming-content-91ebfe2.md -
Determine the SAP theme the users question targets, present the available theme IDs from
theming-base-content/content/Base/baseLibas select options if unclear, default tosap_horizon -
Determine the framework the user's question targets. Present "UI5" (to focus on
openui5), "UI5 Web Components" (focus onwebcomponents), "Fundamental Styles" (focus onfundamental-styles) and "Other" (to focus ontheming-base-content) as select options if unclear, applying these defaults:- Specific component, no framework stated → default to "UI5 Web Components":
- Clone
webcomponentslazily (see below), then search it for a CSS file matching the component name - If found: use it as the primary source; additionally search
theming-base-contentfor parameters matchingsap<ComponentName>_*; report any such parameters not already referenced in the webcomponents CSS as supplementary, labelled "defined in theming-base-content, not yet referenced in webcomponents CSS" (covers new or not-yet-wired parameters); report onlytheming-base-contentparameters — do not surface internal webcomponents CSS custom properties - If not found in
webcomponents: fall back totheming-base-contentparameters containing the component name as the sole source
- Clone
- No specific component → default to "Other"
Once the framework is settled, ensure the corresponding repository exists; if not, clone it lazily:
- UI5 →
openui5:git clone --depth 1 --filter=blob:none --no-checkout https://github.com/UI5/openui5 openui5 git -C openui5 sparse-checkout set --no-cone 'src/themelib_sap_horizon/**/themes/' 'src/themelib_sap_fiori_3/**/themes/' 'src/sap.*/**/themes/base/' git -C openui5 checkout - UI5 Web Components →
webcomponents:git clone --depth 1 --filter=blob:none --no-checkout https://github.com/UI5/webcomponents webcomponents git -C webcomponents sparse-checkout set --no-cone 'packages/*/src/themes/**/*.css' '!packages/theming/**/*.css' git -C webcomponents checkout - Fundamental Styles →
fundamental-styles:git clone --depth 1 --filter=blob:none --no-checkout https://github.com/SAP/fundamental-styles fundamental-styles git -C fundamental-styles sparse-checkout set --no-cone 'packages/*/src/**/*.scss' '!packages/doc-ui/**/*.scss' git -C fundamental-styles checkout - Other → no additional clone;
theming-base-contentis already available from Prerequisites
- Specific component, no framework stated → default to "UI5 Web Components":
-
Read the
.themingfile of the framework the users question targets, determinesBaseLibraryIdandsSourcePathPattern -
Read the
.themingfile of the theme of thesBaseLibraryof the framework the users question targets, based onsSourcePathPatternof the frameworks.themingfile -
While there is an
oExtends:- Read the
.themingfile of the theme referenced byoExtends; if you haven't encountered the framework (the first section of the Object Path) before, read the framework.themingfirst to determine itssSourcePathPattern - Merge the
.themingJSON with what you already have from the theme.themingfiles: if a key already exists, leave it untouched; add key+value if the key does not yet exist
- Read the
-
Read the
${sBaseFileId}.lessfile (sBaseFileIdcomes from the merged.themingfiles) of the theme of thesBaseLibraryof the framework the users question targets -
For each LESS
@importstatement, recursively:- Read the referenced LESS file
- Replace the
@importstatement with the read content
-
In the merged LESS file, map the lines
// [<Annotation> <required: Value> <optional: More Values>]that precede parameter definitions to that parameter:- If a parameter is defined multiple times, merge those annotations
- If an annotation already exists: append the value to the existing annotation values
- If an annotation has values for which it also has "anti-values" (the same value but starting with a
!, e.g. "Protected" and "!Protected"), remove both values from the values list - If an annotation values list is empty, remove the annotation
-
If the user targets "UI5 Web Components", for each relevant component look up the three CSS sources documented in references/theming-repository-layout.md: the theme-independent skeleton at
webcomponents/packages/*/src/themes/<component>.css, merged with the always-used base parameters atwebcomponents/packages/*/src/themes/base/<component>-parameters.css, then with the theme-specific delta atwebcomponents/packages/*/src/themes/<theme>/<component>-parameters.css -
If the user targets "Fundamental Styles", scan
fundamental-styles/packages/*/src/**/*.scssfor the relevant component; theme-specific values come from the CSS custom properties intheming-base-content/content/Base/baseLib/<theme>/css_variables.css -
Answer the users question based on the information collected