-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinput.css
More file actions
238 lines (199 loc) · 4.72 KB
/
Copy pathinput.css
File metadata and controls
238 lines (199 loc) · 4.72 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
@tailwind base;
@tailwind components;
@tailwind utilities;
/* Custom utilities */
@layer utilities {
.text-version-info {
font-size: 12px;
font-weight: 300;
}
}
/* Custom styles for tree and sidebar */
#sidebar.sidebar-hidden {
width: 0;
padding: 0;
overflow: hidden;
}
#sidebar.sidebar-hidden.md\:sidebar-hidden {
width: 0;
padding: 0;
overflow: hidden;
}
/* Mobile sidebar overlay styles */
#sidebar {
transition: width 0.3s ease-in-out, padding 0.3s ease-in-out, transform 0.3s ease-in-out;
}
/* Mobile sidebar shown state */
#sidebar.sidebar-mobile-open {
transform: translateX(0);
}
/* Mobile sidebar hidden state */
#sidebar.sidebar-mobile-hidden {
transform: translateX(-100%);
}
/* Mobile backdrop when sidebar is open */
#sidebar-backdrop {
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 40;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
#sidebar-backdrop.show {
opacity: 1;
visibility: visible;
}
.tree {
list-style: none;
padding: 0;
}
.tree li {
margin: 0.25rem 0;
}
.tree .folder {
cursor: pointer;
font-weight: 600;
padding: 0.25rem 0;
transition: color 0.2s;
}
.tree .folder:hover {
color: #1f2937;
}
.dark .tree .folder:hover {
color: #f3f4f6;
}
.tree .folder:before {
content: '▶ ';
display: inline-block;
transition: transform 0.2s;
}
.tree .folder.open:before {
content: '▼ ';
}
.tree ul {
list-style: none;
padding-left: 1rem;
display: none;
}
.tree .folder.open + ul {
display: block;
}
.tree .snippet-item {
cursor: pointer;
padding: 0.25rem 0 0.25rem 1rem;
transition: background-color 0.2s;
}
.tree .snippet-item:hover {
background-color: rgba(156, 163, 175, 0.1);
border-radius: 0.25rem;
}
.dark .tree .snippet-item:hover {
background-color: rgba(255, 255, 255, 0.2);
}
/* Prism copy button styles */
pre.relative {
position: relative;
}
.copy-to-clipboard-button {
position: absolute;
top: 8px;
right: 8px;
background: rgba(0, 0, 0, 0.1);
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 4px;
padding: 4px 8px;
cursor: pointer;
font-size: 14px;
opacity: 0.7;
transition: opacity 0.2s;
}
.copy-to-clipboard-button:hover {
opacity: 1;
}
.dark .copy-to-clipboard-button {
background: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.2);
}
/* Tab panel transitions */
.tab-panel {
transition: opacity 0.2s ease-in-out;
}
.tab-panel.block {
opacity: 1;
}
.tab-panel.hidden {
opacity: 0;
}
/* Search highlight styles */
.search-highlight {
background-color: #fef3c7;
border-radius: 2px;
padding: 1px 2px;
box-shadow: 0 0 0 1px #f59e0b;
}
.dark .search-highlight {
background-color: #fef3c7;
color: #1f2937;
box-shadow: 0 0 0 1px #f59e0b;
}
/* Mobile responsive snippet styles */
#snippets-container {
max-width: 100vw;
width: 100vw;
box-sizing: border-box;
}
/* Desktop: when sidebar is open (default), account for sidebar width */
@media (min-width: 768px) {
#snippets-container {
max-width: calc(100vw - 20rem); /* 20rem = w-80 (sidebar width) */
width: calc(100vw - 20rem);
}
}
/* Desktop: when sidebar is hidden, use full viewport width */
@media (min-width: 768px) {
#sidebar.sidebar-hidden ~ main #snippets-container {
max-width: 100vw;
width: 100vw;
}
}
#snippets-container > div {
max-width: calc(100vw - 2rem); /* Account for container padding */
box-sizing: border-box;
}
/* Desktop: adjust snippet max-width when sidebar is open */
@media (min-width: 768px) {
#snippets-container > div {
max-width: calc(100vw - 22rem); /* 20rem sidebar + 2rem padding */
}
}
/* Desktop: when sidebar is hidden, use full width for snippets */
@media (min-width: 768px) {
#sidebar.sidebar-hidden ~ main #snippets-container > div {
max-width: calc(100vw - 2rem);
}
}
#snippets-container pre {
max-width: calc(100vw - 4rem); /* Account for container + snippet padding */
box-sizing: border-box;
}
/* Desktop: adjust code block max-width when sidebar is open */
@media (min-width: 768px) {
#snippets-container pre {
max-width: calc(100vw - 24rem); /* 20rem sidebar + 4rem padding */
}
}
/* Desktop: when sidebar is hidden, use full width for code blocks */
@media (min-width: 768px) {
#sidebar.sidebar-hidden ~ main #snippets-container pre {
max-width: calc(100vw - 4rem);
}
}
/* Ensure code blocks don't overflow on mobile */
#snippets-container pre code {
word-wrap: break-word;
white-space: pre-wrap;
max-width: 100%;
overflow-wrap: break-word;
}