Theming API: Implement layer order

This commit is contained in:
mertsincan 2024-03-18 10:57:17 +00:00
parent 926b085060
commit 592a8ed0c4
6 changed files with 40 additions and 13 deletions

View file

@ -110,6 +110,17 @@ export default {
return newColorScheme;
},
getLayerOrder(name, options = {}, defaults) {
const { layer } = options;
if (layer) {
const order = SharedUtils.object.getItemValue(layer.order || defaults.layer.order);
return `@layer ${order}`;
}
return '';
},
getCommonStyleSheet(name, theme = {}, params, props = {}) {
const { preset, base } = theme;
const common_css = this.getCommon(preset, base, params, theme);