@docpensieve/theme 0.3.0 → 0.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/styles/prose.css +68 -0
- package/styles/structure.css +113 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docpensieve/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-beta.2",
|
|
4
4
|
"description": "DocPensieve theme system: composable providers (Tailwind, custom)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"types"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docpensieve/shared": "0.
|
|
23
|
+
"@docpensieve/shared": "0.4.0-beta.2",
|
|
24
24
|
"tailwindcss": "^4.3.3"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
package/styles/prose.css
CHANGED
|
@@ -161,6 +161,31 @@
|
|
|
161
161
|
color: var(--dp-text);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
/* A folded category of the menu, and the menu of a narrow screen. */
|
|
165
|
+
.dp-nav-summary {
|
|
166
|
+
display: block;
|
|
167
|
+
padding: 0.25rem 0.5rem;
|
|
168
|
+
color: var(--dp-text-soft);
|
|
169
|
+
font-weight: 600;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.dp-nav-summary:hover {
|
|
173
|
+
color: var(--dp-text);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.dp-sidebar-menu > summary {
|
|
177
|
+
border: 1px solid var(--dp-border);
|
|
178
|
+
border-radius: var(--dp-radius);
|
|
179
|
+
color: var(--dp-text-soft);
|
|
180
|
+
font-weight: 500;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.dp-sidebar-menu[open] > summary,
|
|
184
|
+
.dp-sidebar-menu > summary:hover {
|
|
185
|
+
border-color: var(--dp-text-soft);
|
|
186
|
+
color: var(--dp-text);
|
|
187
|
+
}
|
|
188
|
+
|
|
164
189
|
/* The links of the header, and the menu that holds them on a narrow screen. */
|
|
165
190
|
.dp-header-links a {
|
|
166
191
|
color: var(--dp-text-soft);
|
|
@@ -172,6 +197,49 @@
|
|
|
172
197
|
color: var(--dp-text);
|
|
173
198
|
}
|
|
174
199
|
|
|
200
|
+
.dp-mega > summary {
|
|
201
|
+
color: var(--dp-text-soft);
|
|
202
|
+
font-weight: 500;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.dp-mega > summary:hover,
|
|
206
|
+
.dp-mega[open] > summary {
|
|
207
|
+
color: var(--dp-text);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.dp-mega-panel {
|
|
211
|
+
border: 1px solid var(--dp-border);
|
|
212
|
+
border-radius: var(--dp-radius);
|
|
213
|
+
background: var(--dp-bg);
|
|
214
|
+
box-shadow: 0 8px 24px var(--dp-shadow);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.dp-mega-title {
|
|
218
|
+
color: var(--dp-text-soft);
|
|
219
|
+
font-size: 0.75rem;
|
|
220
|
+
font-weight: 600;
|
|
221
|
+
letter-spacing: 0.04em;
|
|
222
|
+
text-transform: uppercase;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dp-mega-panel a {
|
|
226
|
+
color: var(--dp-text);
|
|
227
|
+
text-decoration: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.dp-mega-panel a:hover {
|
|
231
|
+
color: var(--dp-accent);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* Inside the menu of a narrow screen, the panel is part of the list. */
|
|
235
|
+
.dp-menu-panel .dp-mega-panel {
|
|
236
|
+
border: 0;
|
|
237
|
+
border-inline-start: 1px solid var(--dp-border);
|
|
238
|
+
border-radius: 0;
|
|
239
|
+
background: transparent;
|
|
240
|
+
box-shadow: none;
|
|
241
|
+
}
|
|
242
|
+
|
|
175
243
|
.dp-menu > summary {
|
|
176
244
|
border: 1px solid var(--dp-border);
|
|
177
245
|
border-radius: var(--dp-radius);
|
package/styles/structure.css
CHANGED
|
@@ -185,6 +185,59 @@ body {
|
|
|
185
185
|
margin-inline-start: 0;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/*
|
|
189
|
+
* A header entry that opens a panel of links instead of leading anywhere.
|
|
190
|
+
* Its look is in prose.css.
|
|
191
|
+
*/
|
|
192
|
+
.dp-mega {
|
|
193
|
+
position: relative;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.dp-mega > summary {
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
list-style: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.dp-mega > summary::-webkit-details-marker {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.dp-mega-panel {
|
|
206
|
+
position: absolute;
|
|
207
|
+
top: calc(100% + 0.5rem);
|
|
208
|
+
left: 0;
|
|
209
|
+
display: grid;
|
|
210
|
+
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
|
|
211
|
+
gap: 1.25rem;
|
|
212
|
+
min-inline-size: 22rem;
|
|
213
|
+
padding: 1.1rem 1.25rem;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.dp-mega-panel ul {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
gap: 0.4rem;
|
|
220
|
+
margin: 0;
|
|
221
|
+
padding: 0;
|
|
222
|
+
list-style: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dp-mega-title {
|
|
226
|
+
margin: 0 0 0.5rem;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/*
|
|
230
|
+
* Inside the menu of a narrow screen, the panel unfolds in place: laid over
|
|
231
|
+
* it, it would open outside the screen.
|
|
232
|
+
*/
|
|
233
|
+
.dp-menu-panel .dp-mega-panel {
|
|
234
|
+
position: static;
|
|
235
|
+
grid-template-columns: minmax(0, 1fr);
|
|
236
|
+
gap: 0.75rem;
|
|
237
|
+
min-inline-size: 0;
|
|
238
|
+
padding: 0.5rem 0 0 0.75rem;
|
|
239
|
+
}
|
|
240
|
+
|
|
188
241
|
.dp-menu {
|
|
189
242
|
display: none;
|
|
190
243
|
position: relative;
|
|
@@ -310,6 +363,59 @@ body {
|
|
|
310
363
|
font-weight: 600;
|
|
311
364
|
}
|
|
312
365
|
|
|
366
|
+
/*
|
|
367
|
+
* A folded category: a native details, whose handle carries the marker. Its
|
|
368
|
+
* look is in prose.css.
|
|
369
|
+
*/
|
|
370
|
+
.dp-nav-group > summary {
|
|
371
|
+
cursor: pointer;
|
|
372
|
+
list-style: none;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.dp-nav-group > summary::-webkit-details-marker {
|
|
376
|
+
display: none;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* The marker turns with the fold, and never takes the focus on its own. */
|
|
380
|
+
.dp-nav-group > summary::after {
|
|
381
|
+
content: '';
|
|
382
|
+
display: inline-block;
|
|
383
|
+
inline-size: 0.35rem;
|
|
384
|
+
block-size: 0.35rem;
|
|
385
|
+
margin-inline-start: 0.4rem;
|
|
386
|
+
border-inline-end: 1px solid currentColor;
|
|
387
|
+
border-block-end: 1px solid currentColor;
|
|
388
|
+
rotate: -45deg;
|
|
389
|
+
translate: 0 -0.1rem;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.dp-nav-group[open] > summary::after {
|
|
393
|
+
rotate: 45deg;
|
|
394
|
+
translate: 0 -0.15rem;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/*
|
|
398
|
+
* The menu of a narrow screen: folded above the content, where the column
|
|
399
|
+
* cannot stand. Shown instead of the column, never beside it.
|
|
400
|
+
*/
|
|
401
|
+
.dp-sidebar-menu {
|
|
402
|
+
display: none;
|
|
403
|
+
margin-block-end: 1.5rem;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.dp-sidebar-menu > summary {
|
|
407
|
+
display: inline-flex;
|
|
408
|
+
align-items: center;
|
|
409
|
+
gap: 0.4rem;
|
|
410
|
+
padding: 0.5rem 0.9rem;
|
|
411
|
+
cursor: pointer;
|
|
412
|
+
list-style: none;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.dp-sidebar-menu > summary::-webkit-details-marker {
|
|
416
|
+
display: none;
|
|
417
|
+
}
|
|
418
|
+
|
|
313
419
|
.dp-sidebar,
|
|
314
420
|
.dp-toc {
|
|
315
421
|
position: sticky;
|
|
@@ -398,13 +504,15 @@ body {
|
|
|
398
504
|
padding: 1.5rem 25px 4rem;
|
|
399
505
|
}
|
|
400
506
|
/*
|
|
401
|
-
* On a small screen the
|
|
402
|
-
*
|
|
507
|
+
* On a small screen the column gives way to the folded menu above the
|
|
508
|
+
* content: open, it would eat the first screen before a word is read.
|
|
403
509
|
*/
|
|
404
510
|
.dp-sidebar {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
511
|
+
display: none;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.dp-sidebar-menu {
|
|
515
|
+
display: block;
|
|
408
516
|
}
|
|
409
517
|
}
|
|
410
518
|
|