mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 18:41:23 +01:00
feat: ai widget - improve style
This commit is contained in:
parent
d94defaa18
commit
85a6bc9c66
5 changed files with 24 additions and 7 deletions
|
|
@ -447,6 +447,7 @@ function changeDialogsTheme(themeColor, transparency) {
|
|||
};
|
||||
|
||||
const theme = [
|
||||
{name: "--bg-opacity", value: alpha},
|
||||
{name: "--bg-main", h, s, l, alpha},
|
||||
{name: "--bg-lighter", h, s, l: l + 0.02, alpha},
|
||||
{name: "--bg-light", h, s: s - 0.02, l: l + 0.06, alpha},
|
||||
|
|
@ -459,8 +460,9 @@ function changeDialogsTheme(themeColor, transparency) {
|
|||
];
|
||||
|
||||
const sx = document.documentElement.style;
|
||||
theme.forEach(({name, h, s, l, alpha}) => {
|
||||
sx.setProperty(name, getRGBA(h, s, l, alpha));
|
||||
theme.forEach(({name, value, h, s, l, alpha}) => {
|
||||
if (value !== undefined) sx.setProperty(name, value);
|
||||
else sx.setProperty(name, getRGBA(h, s, l, alpha));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue