-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Expand file tree
/
Copy pathstyles.css
More file actions
175 lines (145 loc) · 5.41 KB
/
Copy pathstyles.css
File metadata and controls
175 lines (145 loc) · 5.41 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
@reference "#reference.css";
/*
CSS custom properties required by this module — define on :root or an ancestor:
--sidebar-width-folded Width when collapsed (e.g. 4rem)
--sidebar-width-expanded Width when open (e.g. 15rem)
*/
/* ---------------------------------------------------------------------------
SidebarRoot — inner content wrapper (hosts Header / Body / Footer)
--------------------------------------------------------------------------- */
.opal-sidebar-root__inner {
@apply flex flex-col min-h-0 h-full;
}
/* ---------------------------------------------------------------------------
SidebarRoot — desktop column
--------------------------------------------------------------------------- */
.opal-sidebar-root__column {
@apply h-screen flex flex-col bg-background-tint-02 pb-2 shrink-0;
width: var(--sidebar-width-expanded);
transition: width 200ms ease-in-out;
}
.opal-sidebar-root__column[data-folded="true"] {
width: var(--sidebar-width-folded);
}
/* ---------------------------------------------------------------------------
SidebarRoot — mobile / small overlays
--------------------------------------------------------------------------- */
/* Shared visual column styles for overlaid sidebar */
.opal-sidebar-root__overlay {
@apply flex flex-col bg-background-tint-02 pb-2;
width: var(--sidebar-width-expanded);
transition: width 200ms ease-in-out;
}
.opal-sidebar-root__overlay[data-folded="true"] {
width: var(--sidebar-width-folded);
}
/* Mobile: full-height overlay that slides in/out */
.opal-sidebar-root__overlay[data-variant="mobile"] {
@apply fixed inset-y-0 left-0 z-50 transition-transform duration-200;
}
.opal-sidebar-root__overlay[data-variant="mobile"][data-folded="true"] {
@apply -translate-x-full;
}
.opal-sidebar-root__overlay[data-variant="mobile"][data-folded="false"] {
@apply translate-x-0;
}
/* Small: fixed overlay (spacer holds width in the layout flow) */
.opal-sidebar-root__overlay[data-variant="small"] {
@apply fixed inset-y-0 left-0 z-50;
}
/* Spacer that reserves the folded width in the flex row on small screens */
.opal-sidebar-root__spacer {
@apply shrink-0;
width: var(--sidebar-width-folded);
}
/* Shared backdrop */
.opal-sidebar-root__backdrop {
@apply fixed inset-0 z-40 backdrop-blur-03 transition-opacity duration-200;
}
.opal-sidebar-root__backdrop[data-variant="mobile"] {
@apply bg-mask-03;
}
.opal-sidebar-root__backdrop[data-folded="true"] {
@apply opacity-0 pointer-events-none;
}
.opal-sidebar-root__backdrop[data-folded="false"] {
@apply opacity-100 pointer-events-auto;
}
/* ---------------------------------------------------------------------------
SidebarHeader — topbar row (logo + fold button) + optional pinned content
--------------------------------------------------------------------------- */
.opal-sidebar-header {
@apply flex flex-col gap-4;
}
.opal-sidebar-header__topbar {
@apply pt-3 px-2;
}
.opal-sidebar-header__topbar-inner {
@apply flex flex-row justify-between items-start px-1 w-full;
}
.opal-sidebar-header__content {
@apply px-2;
}
/* Folded logo/unfold button: one control, two faces. The logo shows at rest and
the fold icon replaces it while the sidebar is hovered or the button holds
keyboard focus — pointerless input keeps the logo, which is clickable either
way. Sized by the caller so the swap never changes the button's footprint. */
.opal-sidebar-header__logo-swap {
@apply flex items-center justify-center;
}
.opal-sidebar-header__logo-rest {
display: flex;
}
.opal-sidebar-header__logo-fold {
display: none;
}
.opal-sidebar-root__overlay:hover .opal-sidebar-header__logo-rest,
.opal-sidebar-root__column:hover .opal-sidebar-header__logo-rest,
.opal-sidebar-header__topbar-inner:has(:focus-visible)
.opal-sidebar-header__logo-rest {
display: none;
}
.opal-sidebar-root__overlay:hover .opal-sidebar-header__logo-fold,
.opal-sidebar-root__column:hover .opal-sidebar-header__logo-fold,
.opal-sidebar-header__topbar-inner:has(:focus-visible)
.opal-sidebar-header__logo-fold {
display: flex;
}
/* ---------------------------------------------------------------------------
SidebarFooter
--------------------------------------------------------------------------- */
.opal-sidebar-footer {
@apply pt-4 px-2;
}
/* ---------------------------------------------------------------------------
SidebarBody
--------------------------------------------------------------------------- */
/* Applied to the ShadowDiv wrapper, which provides positioning and column flow */
.opal-sidebar-body {
@apply flex-1;
}
/* Applied to the ShadowDiv scroll container, which provides overflow-y-auto.
Thin themed scrollbar keeps position/drag affordance without the default bar. */
.opal-sidebar-body__scroll {
@apply flex-1 min-h-0 flex flex-col;
scrollbar-width: thin;
scrollbar-color: var(--border-02) transparent;
}
.opal-sidebar-body__content {
@apply flex-1 flex flex-col px-2;
}
.opal-sidebar-root__inner[data-folded="true"] .opal-sidebar-body__content {
@apply hidden;
}
.opal-sidebar-body__spacer {
min-height: 2rem;
}
/* ---------------------------------------------------------------------------
SidebarSection
--------------------------------------------------------------------------- */
.opal-sidebar-section__header {
@apply pt-3 pl-2 pr-1 flex flex-row justify-between items-center;
}
.opal-sidebar-section__title {
@apply flex px-0.5 py-1.5;
}