-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathdrawer.css
74 lines (74 loc) · 1.66 KB
/
drawer.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
.drawer.drawer-end > .drawer-toggle:checked ~ .drawer-content {
@apply -translate-x-2;
}
.drawer-toggle {
& ~ .drawer-content {
@apply transition-all duration-300 ease-in-out;
}
& ~ .drawer-side {
& > .drawer-overlay {
@apply cursor-pointer bg-neutral-focus transition-all duration-300 ease-in-out;
}
& > .drawer-overlay + * {
@apply transition-all duration-300 ease-in-out;
}
}
&:checked {
& ~ .drawer-content {
@apply translate-x-2;
}
& ~ .drawer-side {
& > .drawer-overlay {
opacity: 0.999999; /* 1 causes a bug on chrome 🤷♂️ */
@apply bg-opacity-40;
}
}
}
&:focus-visible {
& ~ .drawer-content .drawer-button {
outline: 2px solid hsl(var(--nf));
outline-offset: 2px;
&.btn-primary {
outline: 2px solid hsl(var(--p));
}
&.btn-secondary {
outline: 2px solid hsl(var(--s));
}
&.btn-accent {
outline: 2px solid hsl(var(--a));
}
&.btn-info {
outline: 2px solid hsl(var(--in));
}
&.btn-success {
outline: 2px solid hsl(var(--su));
}
&.btn-warning {
outline: 2px solid hsl(var(--wa));
}
&.btn-error {
outline: 2px solid hsl(var(--er));
}
&.glass {
outline: 2px solid currentColor;
}
&.btn-ghost {
outline: 2px solid currentColor;
}
&.btn-link {
outline: 2px solid currentColor;
}
}
}
}
@media (min-width: 1024px) {
.drawer-mobile {
& > .drawer-toggle {
&:checked {
& ~ .drawer-content {
@apply translate-x-0;
}
}
}
}
}