Skip to content

Commit

Permalink
add fade-in to color header buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
BomberFish committed Dec 5, 2024
1 parent 2520939 commit 8a2115c
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/coreapps/WallpaperSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class WallpaperSelector extends App {
border: none;
padding: 0;
width: 2.5rem;
height: 25px;
height: 2rem;
}
input[type="color" i]::-webkit-color-swatch {
Expand Down Expand Up @@ -196,6 +196,7 @@ class WallpaperSelector extends App {
align-items: center;
width: 100%;
padding-block: 0.6rem;
/* height: 2.75em; */
}
.editor:not(:last-of-type) {
Expand Down Expand Up @@ -232,6 +233,9 @@ class WallpaperSelector extends App {
display: flex;
gap: 0.15rem;
opacity: 1;
transition: opacity 0.15s allow-discrete;
& button {
padding: 0.5rem 0.75rem;
border-radius: 10rem;
Expand Down Expand Up @@ -268,6 +272,18 @@ class WallpaperSelector extends App {
transition: 0.05s background;
}
}
&[hidden] {
opacity: 0;
pointer-events: none;
transition: opacity 0.15s allow-discrete;
}
/* because fuck firefox and its users */
@starting-style {
opacity: 0;
transition: opacity 0.15 allow-discrete;
}
}
&:has(#colors) h2:not(:first-of-type) {
Expand Down Expand Up @@ -386,7 +402,13 @@ class WallpaperSelector extends App {
</span>
{$if(
use(this.state.tab, (tab) => tab === "colors"),
<span id="btns">
<span
id="btns"
bind:hidden={use(
this.state.tab,
(tab) => tab === "wallpapers",
)}
>
<button
style={{
color: use(anura.ui.theme.state.foreground),
Expand Down

0 comments on commit 8a2115c

Please sign in to comment.