-
Notifications
You must be signed in to change notification settings - Fork 0
/
experimental.css
80 lines (69 loc) · 1.92 KB
/
experimental.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/* EXPERIMENTAL */
/* ASIDE */
/* SIDEBAR */
/* Inspiration: https://every-layout.dev/layouts/sidebar/ */
body[data-layout="sidebar"] {
display: flex;
flex-wrap: wrap;
}
body[data-layout="sidebar"] aside {
position: relative;
/* ↓ The width when the sidebar _is_ a sidebar */
flex-basis: 20rem;
flex-grow: 1;
}
body[data-layout="sidebar"] aside ul {
z-index: 999;
top: 0;
padding: 1rem;
position: sticky;
background-color: var(--secondary-background);
list-style-type: none;
display: flex;
flex-direction: column;
flex-wrap: wrap;
gap: 0.25rem;
padding: 0.5rem;
margin: 0rem;
border-bottom-right-radius: var(--border-radius)
}
body[data-layout="sidebar"] aside ul li {
background-color: var(--primary-background);
border-radius: var(--border-radius);
padding: 0.25rem;
list-style: none;
}
body[data-layout="sidebar"] aside ul li input[type="radio"] {
display: none;
}
body[data-layout="sidebar"] aside ul li label, body[data-layout="sidebar"] aside ul li a {
cursor: pointer;
transition: 0.3s;
}
body[data-layout="sidebar"] aside ul li label:hover, body[data-layout="sidebar"] aside ul li a:hover {
padding-left: 1rem;
}
body[data-layout="sidebar"] aside ul li input[type="radio"]:checked+label {
padding-left: 0rem;
color: var(--accent-color);
text-decoration: underline;
}
body[data-layout="sidebar"] aside ul li input[type="radio"]:checked+label::before {
content: "";
display: inline-block;
width: 0.5rem;
height: 0.5rem;
background-color: var(--accent-color);
margin-right: 0.5rem;
}
body[data-layout="sidebar"] aside ul li input[type="radio"]+label {
color: var(--primary-color);
text-decoration: none;
}
body[data-layout="sidebar"] main {
/* ↓ Grow from nothing */
flex-basis: 0;
flex-grow: 999;
/* ↓ Wrap when the elements are of equal width */
min-inline-size: 50%;
}