mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
fix(css): improve the handling of different color entries EE-3603 (#7134)
This commit is contained in:
parent
cd19eb036b
commit
8eff32ebc7
1 changed files with 10 additions and 2 deletions
|
@ -4,7 +4,15 @@ const element = document.createElement('style');
|
|||
|
||||
element.innerHTML = `:root {
|
||||
${Object.entries(colors)
|
||||
.map(([color, hex]) => `--ui-${color}: ${hex}`)
|
||||
.map(([color, hex]) => {
|
||||
if (typeof hex === 'string') {
|
||||
return `--ui-${color}: ${hex}`;
|
||||
}
|
||||
|
||||
return Object.entries(hex)
|
||||
.map(([key, value]) => `--ui-${color}-${key}: ${value}`)
|
||||
.join(';\n');
|
||||
})
|
||||
.join(';\n')}
|
||||
}`;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue