Skip to content

Commit ed67b3d

Browse files
committed
[design] improve theme preset controls
1 parent aa91c0b commit ed67b3d

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

‎src/css/theme.css‎

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.theme-preset-button .button-text{
10-
margin-top:0.75em;
10+
margin-top:1em;
1111
margin-bottom:1em;
1212
margin-left:0;
1313
font-size:0.75em;
@@ -34,6 +34,7 @@
3434
top:0;
3535
left:0;
3636
display: block;
37+
transition: clip-path var(--layout-timing-extra-fast);
3738
}
3839

3940
.theme-preset-background-01{
@@ -42,22 +43,50 @@
4243

4344
.theme-preset-background-02{
4445
z-index:2;
45-
clip-path:polygon(040%,60%100%,100%100%,100%0,00);
46+
clip-path:polygon(00,100%100%,100%100%,100%0,00);
47+
transition-delay:var(--layout-duration-04);
4648
}
4749

4850
.theme-preset-background-03{
4951
z-index:3;
50-
clip-path:polygon(00,100%100%,100%0);
52+
clip-path:polygon(00,40%0,100%60%,100%0);
53+
transition-delay:var(--layout-duration-03);
5154
}
5255

5356
.theme-preset-background-04{
5457
z-index:4;
55-
clip-path:polygon(40%0,100%60%,100%0);
58+
clip-path:polygon(80%0,100%20%,100%0);
59+
transition-delay:var(--layout-duration-02);
5660
}
5761

5862
.theme-preset-accent{
5963
z-index:5;
6064
clip-path:polygon(100%50%,100%100%,50%100%);
65+
transition-delay:var(--layout-duration-02);
66+
}
67+
68+
.theme-preset-button:focus .theme-preset-background-02,
69+
.theme-preset-button:hover .theme-preset-background-02{
70+
clip-path:polygon(040%,60%100%,100%100%,100%0,00);
71+
transition-delay:var(--layout-duration-01);
72+
}
73+
74+
.theme-preset-button:focus .theme-preset-background-03,
75+
.theme-preset-button:hover .theme-preset-background-03{
76+
clip-path:polygon(00,00,100%100%,100%0);
77+
transition-delay:var(--layout-duration-02);
78+
}
79+
80+
.theme-preset-button:focus .theme-preset-background-04,
81+
.theme-preset-button:hover .theme-preset-background-04{
82+
clip-path:polygon(40%0,100%60%,100%0);
83+
transition-delay:var(--layout-duration-03);
84+
}
85+
86+
.theme-preset-button:focus .theme-preset-accent,
87+
.theme-preset-button:hover .theme-preset-accent{
88+
clip-path:polygon(100%40%,100%100%,40%100%);
89+
transition-delay:var(--layout-duration-02);
6190
}
6291

6392
.theme-preset-background-nighttab-01{

‎src/css/variables.css‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,15 @@
103103
--layout-space:0.5em;
104104
--layout-padding:4;
105105
--layout-gutter:4;
106+
--layout-duration-01:0.1s;
106107
--layout-duration-02:0.2s;
108+
--layout-duration-03:0.3s;
107109
--layout-duration-04:0.4s;
110+
--layout-duration-05:0.5s;
108111
--layout-duration-06:0.6s;
112+
--layout-duration-07:0.7s;
109113
--layout-duration-08:0.8s;
114+
--layout-duration-09:0.9s;
110115
--layout-duration-10:1s;
111116
--layout-timing-extra-fast:var(--layout-duration-02) ease-in-out;
112117
--layout-timing-fast:var(--layout-duration-04) ease-in-out;

0 commit comments

Comments
(0)