gradientes

This commit is contained in:
Erica Z 2024-11-16 10:15:45 +01:00
parent 32576dce87
commit d5f140b95c
2 changed files with 17 additions and 10 deletions

View file

@ -1,8 +1,18 @@
toolbarview#main { toolbarview#main {
/* from amberol */ /* from amberol */
background: linear-gradient(127deg, color-mix(in srgb, var(--background-color-0) 55%, transparent), color-mix(in srgb, var(--background-color-0) 0%, transparent) 70.71%), background:
linear-gradient(217deg, color-mix(in srgb, var(--background-color-1) 55%, transparent), color-mix(in srgb, var(--background-color-1) 0%, transparent) 70.71%), linear-gradient(
linear-gradient(336deg, color-mix(in srgb, var(--background-color-2) 55%, transparent), color-mix(in srgb, var(--background-color-2) 0%, transparent) 70.71%); 127deg,
color-mix(in srgb, var(--background-color-0) 55%, transparent),
color-mix(in srgb, var(--background-color-0) 0%, transparent) 70.71%),
linear-gradient(
217deg,
color-mix(in srgb, var(--background-color-1) 55%, transparent),
color-mix(in srgb, var(--background-color-1) 0%, transparent) 70.71%),
linear-gradient(
336deg,
color-mix(in srgb, var(--background-color-2) 55%, transparent),
color-mix(in srgb, var(--background-color-2) 0%, transparent) 70.71%);
transition-property: background; transition-property: background;
transition-duration: 250ms; transition-duration: 250ms;
transition-timing-function: ease; transition-timing-function: ease;

View file

@ -690,8 +690,8 @@ mod imp {
} else { } else {
color_thief::ColorFormat::Rgb color_thief::ColorFormat::Rgb
}, },
5, 8,
4, 3,
) )
.unwrap(); .unwrap();
@ -709,14 +709,11 @@ mod imp {
) )
}) })
.enumerate() .enumerate()
.cycle()
.take(3)
{ {
css.push_str(&format!("--background-color-{i}: {color}; ")); css.push_str(&format!("--background-color-{i}: {color}; "));
} }
for i in n_colors..3 {
css.push_str(&format!(
"--background-color-{i}: var(--window-bg-color); "
));
}
css.push_str("}"); css.push_str("}");
window.imp().css_provider.load_from_string(&css); window.imp().css_provider.load_from_string(&css);