@subroh0508/marp-theme-canvas 0.0.6 → 0.0.8
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/css/black-canvas.css +27 -9
- package/css/white-canvas.css +27 -9
- package/package.json +1 -1
- package/scss/component/CLAUDE.md +2 -0
- package/scss/component/_hr.scss +25 -0
- package/scss/page/_display.scss +2 -1
- package/scss/page/_section.scss +5 -5
- package/scss/page/_title.scss +6 -5
- package/scss/theme/CLAUDE.md +8 -0
- package/scss/theme/_black-canvas.scss +13 -0
- package/scss/theme/_white-canvas.scss +13 -0
package/css/black-canvas.css
CHANGED
|
@@ -83,6 +83,9 @@
|
|
|
83
83
|
--numbered-list-indent: 1.1em;
|
|
84
84
|
--bullet-list-padding-left: 0.2em;
|
|
85
85
|
--numbered-list-padding-left: 0.2em;
|
|
86
|
+
--hr-height: 1px;
|
|
87
|
+
--hr-width: 100%;
|
|
88
|
+
--hr-color: var(--color-grey-medium);
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
section pre :where(.hljs) {
|
|
@@ -202,16 +205,18 @@ section::after {
|
|
|
202
205
|
font-size: var(--font-size-note);
|
|
203
206
|
color: var(--color-grey-light);
|
|
204
207
|
}
|
|
208
|
+
section.title {
|
|
209
|
+
justify-content: center;
|
|
210
|
+
}
|
|
205
211
|
section.title h1 {
|
|
206
212
|
font-size: var(--font-size-display);
|
|
213
|
+
display: block;
|
|
207
214
|
flex: 0 0 80%;
|
|
208
|
-
|
|
209
|
-
flex-direction: column;
|
|
210
|
-
align-items: flex-start;
|
|
211
|
-
justify-content: center;
|
|
215
|
+
align-content: center;
|
|
212
216
|
margin: 0;
|
|
213
217
|
}
|
|
214
218
|
section.title h1 small {
|
|
219
|
+
display: block;
|
|
215
220
|
margin-top: 0.5em;
|
|
216
221
|
font-size: 0.5em;
|
|
217
222
|
}
|
|
@@ -225,11 +230,12 @@ section.title h1 + p {
|
|
|
225
230
|
color: var(--color-grey-medium);
|
|
226
231
|
margin: 0;
|
|
227
232
|
}
|
|
233
|
+
section.section {
|
|
234
|
+
justify-content: center;
|
|
235
|
+
}
|
|
228
236
|
section.section p {
|
|
229
|
-
flex: 1;
|
|
230
|
-
display:
|
|
231
|
-
align-items: center;
|
|
232
|
-
justify-content: flex-start;
|
|
237
|
+
flex: 0 1;
|
|
238
|
+
display: block;
|
|
233
239
|
font-size: var(--font-size-title);
|
|
234
240
|
font-weight: bold;
|
|
235
241
|
margin: 0;
|
|
@@ -271,7 +277,7 @@ section.display p {
|
|
|
271
277
|
margin: 0;
|
|
272
278
|
text-align: center;
|
|
273
279
|
}
|
|
274
|
-
section.display:not(:has(img, iframe)) p {
|
|
280
|
+
section.display:not(:has(img:not(.emoji), iframe)) p {
|
|
275
281
|
font-size: var(--font-size-display);
|
|
276
282
|
font-weight: var(--font-weight-bold);
|
|
277
283
|
}
|
|
@@ -452,6 +458,18 @@ section .columns > .column-10 > *,
|
|
|
452
458
|
section .columns > .column-10 p > * {
|
|
453
459
|
max-width: 100%;
|
|
454
460
|
}
|
|
461
|
+
section hr, section.hr-solid hr {
|
|
462
|
+
width: var(--hr-width);
|
|
463
|
+
border: none;
|
|
464
|
+
border-top: var(--hr-height) solid var(--hr-color);
|
|
465
|
+
margin: 0 0 1em;
|
|
466
|
+
}
|
|
467
|
+
section.hr-dashed hr {
|
|
468
|
+
width: var(--hr-width);
|
|
469
|
+
border: none;
|
|
470
|
+
border-top: var(--hr-height) dashed var(--hr-color);
|
|
471
|
+
margin: 0 0 1em;
|
|
472
|
+
}
|
|
455
473
|
|
|
456
474
|
header {
|
|
457
475
|
position: absolute;
|
package/css/white-canvas.css
CHANGED
|
@@ -83,6 +83,9 @@
|
|
|
83
83
|
--numbered-list-indent: 1.1em;
|
|
84
84
|
--bullet-list-padding-left: 0.2em;
|
|
85
85
|
--numbered-list-padding-left: 0.2em;
|
|
86
|
+
--hr-height: 1px;
|
|
87
|
+
--hr-width: 100%;
|
|
88
|
+
--hr-color: var(--color-grey-light);
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
section pre :where(.hljs) {
|
|
@@ -202,16 +205,18 @@ section::after {
|
|
|
202
205
|
font-size: var(--font-size-note);
|
|
203
206
|
color: var(--color-grey-medium);
|
|
204
207
|
}
|
|
208
|
+
section.title {
|
|
209
|
+
justify-content: center;
|
|
210
|
+
}
|
|
205
211
|
section.title h1 {
|
|
206
212
|
font-size: var(--font-size-display);
|
|
213
|
+
display: block;
|
|
207
214
|
flex: 0 0 80%;
|
|
208
|
-
|
|
209
|
-
flex-direction: column;
|
|
210
|
-
align-items: flex-start;
|
|
211
|
-
justify-content: center;
|
|
215
|
+
align-content: center;
|
|
212
216
|
margin: 0;
|
|
213
217
|
}
|
|
214
218
|
section.title h1 small {
|
|
219
|
+
display: block;
|
|
215
220
|
margin-top: 0.5em;
|
|
216
221
|
font-size: 0.5em;
|
|
217
222
|
}
|
|
@@ -225,11 +230,12 @@ section.title h1 + p {
|
|
|
225
230
|
color: var(--color-grey-light);
|
|
226
231
|
margin: 0;
|
|
227
232
|
}
|
|
233
|
+
section.section {
|
|
234
|
+
justify-content: center;
|
|
235
|
+
}
|
|
228
236
|
section.section p {
|
|
229
|
-
flex: 1;
|
|
230
|
-
display:
|
|
231
|
-
align-items: center;
|
|
232
|
-
justify-content: flex-start;
|
|
237
|
+
flex: 0 1;
|
|
238
|
+
display: block;
|
|
233
239
|
font-size: var(--font-size-title);
|
|
234
240
|
font-weight: bold;
|
|
235
241
|
margin: 0;
|
|
@@ -271,7 +277,7 @@ section.display p {
|
|
|
271
277
|
margin: 0;
|
|
272
278
|
text-align: center;
|
|
273
279
|
}
|
|
274
|
-
section.display:not(:has(img, iframe)) p {
|
|
280
|
+
section.display:not(:has(img:not(.emoji), iframe)) p {
|
|
275
281
|
font-size: var(--font-size-display);
|
|
276
282
|
font-weight: var(--font-weight-bold);
|
|
277
283
|
}
|
|
@@ -452,6 +458,18 @@ section .columns > .column-10 > *,
|
|
|
452
458
|
section .columns > .column-10 p > * {
|
|
453
459
|
max-width: 100%;
|
|
454
460
|
}
|
|
461
|
+
section hr, section.hr-solid hr {
|
|
462
|
+
width: var(--hr-width);
|
|
463
|
+
border: none;
|
|
464
|
+
border-top: var(--hr-height) solid var(--hr-color);
|
|
465
|
+
margin: 0 0 1em;
|
|
466
|
+
}
|
|
467
|
+
section.hr-dashed hr {
|
|
468
|
+
width: var(--hr-width);
|
|
469
|
+
border: none;
|
|
470
|
+
border-top: var(--hr-height) dashed var(--hr-color);
|
|
471
|
+
margin: 0 0 1em;
|
|
472
|
+
}
|
|
455
473
|
|
|
456
474
|
header {
|
|
457
475
|
position: absolute;
|
package/package.json
CHANGED
package/scss/component/CLAUDE.md
CHANGED
|
@@ -24,6 +24,7 @@ section {
|
|
|
24
24
|
@include section.configure(...);
|
|
25
25
|
@include pagination.configure(...);
|
|
26
26
|
@include prettylights.configure;
|
|
27
|
+
@include hr.configure(...);
|
|
27
28
|
}
|
|
28
29
|
```
|
|
29
30
|
|
|
@@ -52,4 +53,5 @@ section {
|
|
|
52
53
|
| `_code.scss` | `code`, `pre`, `tt` | Code blocks |
|
|
53
54
|
| `_blockquote.scss` | `blockquote` | Blockquote |
|
|
54
55
|
| `_text-decorator.scss` | `strong`, `mark`, `rp` | Text decoration |
|
|
56
|
+
| `_hr.scss` | `hr` | Horizontal rule |
|
|
55
57
|
| `prettylights/*` | `.hljs-*` | Syntax highlighting |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ===== _hr.scss =====
|
|
2
|
+
// Horizontal rule styles
|
|
3
|
+
|
|
4
|
+
@mixin _hr($height, $width, $color, $style) {
|
|
5
|
+
width: $width;
|
|
6
|
+
// Reset browser default border
|
|
7
|
+
border: none;
|
|
8
|
+
border-top: $height $style $color;
|
|
9
|
+
margin: 0 0 1em;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin configure(
|
|
13
|
+
$height,
|
|
14
|
+
$width,
|
|
15
|
+
$color
|
|
16
|
+
) {
|
|
17
|
+
hr,
|
|
18
|
+
&.hr-solid hr {
|
|
19
|
+
@include _hr($height, $width, $color, solid);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.hr-dashed hr {
|
|
23
|
+
@include _hr($height, $width, $color, dashed);
|
|
24
|
+
}
|
|
25
|
+
}
|
package/scss/page/_display.scss
CHANGED
package/scss/page/_section.scss
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
@mixin configure($font-size, $font-weight: bold) {
|
|
7
7
|
&.section {
|
|
8
|
+
justify-content: center;
|
|
9
|
+
|
|
8
10
|
// p: Section title
|
|
9
|
-
// Vertically centered
|
|
11
|
+
// Vertically centered
|
|
10
12
|
p {
|
|
11
|
-
flex: 1;
|
|
12
|
-
display:
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: flex-start;
|
|
13
|
+
flex: 0 1;
|
|
14
|
+
display: block;
|
|
15
15
|
font-size: $font-size;
|
|
16
16
|
font-weight: $font-weight;
|
|
17
17
|
margin: 0;
|
package/scss/page/_title.scss
CHANGED
|
@@ -5,19 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
@mixin configure($font-size-title, $color-metadata-text) {
|
|
7
7
|
&.title {
|
|
8
|
+
justify-content: center;
|
|
9
|
+
|
|
8
10
|
// h1: Title text
|
|
9
|
-
// Occupies 80% of section, vertically centered
|
|
11
|
+
// Occupies 80% of section, vertically centered
|
|
10
12
|
h1 {
|
|
11
13
|
font-size: $font-size-title;
|
|
14
|
+
display: block;
|
|
12
15
|
flex: 0 0 80%;
|
|
13
|
-
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: flex-start;
|
|
16
|
-
justify-content: center;
|
|
16
|
+
align-content: center;
|
|
17
17
|
margin: 0;
|
|
18
18
|
|
|
19
19
|
// small: Subtitle
|
|
20
20
|
small {
|
|
21
|
+
display: block;
|
|
21
22
|
margin-top: 0.5em;
|
|
22
23
|
font-size: 0.5em;
|
|
23
24
|
}
|
package/scss/theme/CLAUDE.md
CHANGED
|
@@ -81,6 +81,14 @@ The following CSS variables have no default values and must be defined when used
|
|
|
81
81
|
| `--bullet-list-padding-left` | Bullet list item (li) padding | `0.2em` |
|
|
82
82
|
| `--numbered-list-padding-left` | Numbered list item (li) padding | `0.2em` |
|
|
83
83
|
|
|
84
|
+
### Horizontal Rule
|
|
85
|
+
|
|
86
|
+
| Variable | Description | white-canvas | black-canvas |
|
|
87
|
+
|----------|-------------|--------------|--------------|
|
|
88
|
+
| `--hr-height` | Line thickness | `1px` | `1px` |
|
|
89
|
+
| `--hr-width` | Line width | `100%` | `100%` |
|
|
90
|
+
| `--hr-color` | Line color | `grey-light` | `grey-medium` |
|
|
91
|
+
|
|
84
92
|
## Available Mixins
|
|
85
93
|
|
|
86
94
|
| Mixin | Description |
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
@use '../component/text-decorator' as text-decorator;
|
|
28
28
|
@use '../component/columns' as columns;
|
|
29
29
|
@use '../component/a' as a;
|
|
30
|
+
@use '../component/hr' as hr;
|
|
30
31
|
|
|
31
32
|
// ===== Page styles =====
|
|
32
33
|
@use '../page/title' as page-title;
|
|
@@ -105,6 +106,11 @@
|
|
|
105
106
|
--bullet-list-padding-left: 0.2em;
|
|
106
107
|
--numbered-list-padding-left: 0.2em;
|
|
107
108
|
|
|
109
|
+
// --- Horizontal rule ---
|
|
110
|
+
--hr-height: 1px;
|
|
111
|
+
--hr-width: 100%;
|
|
112
|
+
--hr-color: var(--color-grey-medium);
|
|
113
|
+
|
|
108
114
|
// Custom variables
|
|
109
115
|
@content;
|
|
110
116
|
}
|
|
@@ -169,6 +175,13 @@
|
|
|
169
175
|
|
|
170
176
|
// ===== Column layout =====
|
|
171
177
|
@include columns.configure();
|
|
178
|
+
|
|
179
|
+
// ===== Horizontal rule =====
|
|
180
|
+
@include hr.configure(
|
|
181
|
+
$height: var(--hr-height),
|
|
182
|
+
$width: var(--hr-width),
|
|
183
|
+
$color: var(--hr-color)
|
|
184
|
+
);
|
|
172
185
|
}
|
|
173
186
|
|
|
174
187
|
// ===== header =====
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
@use '../component/text-decorator' as text-decorator;
|
|
28
28
|
@use '../component/columns' as columns;
|
|
29
29
|
@use '../component/a' as a;
|
|
30
|
+
@use '../component/hr' as hr;
|
|
30
31
|
|
|
31
32
|
// ===== Page styles =====
|
|
32
33
|
@use '../page/title' as page-title;
|
|
@@ -105,6 +106,11 @@
|
|
|
105
106
|
--bullet-list-padding-left: 0.2em;
|
|
106
107
|
--numbered-list-padding-left: 0.2em;
|
|
107
108
|
|
|
109
|
+
// --- Horizontal rule ---
|
|
110
|
+
--hr-height: 1px;
|
|
111
|
+
--hr-width: 100%;
|
|
112
|
+
--hr-color: var(--color-grey-light);
|
|
113
|
+
|
|
108
114
|
// Custom variables
|
|
109
115
|
@content;
|
|
110
116
|
}
|
|
@@ -169,6 +175,13 @@
|
|
|
169
175
|
|
|
170
176
|
// ===== Column layout =====
|
|
171
177
|
@include columns.configure();
|
|
178
|
+
|
|
179
|
+
// ===== Horizontal rule =====
|
|
180
|
+
@include hr.configure(
|
|
181
|
+
$height: var(--hr-height),
|
|
182
|
+
$width: var(--hr-width),
|
|
183
|
+
$color: var(--hr-color)
|
|
184
|
+
);
|
|
172
185
|
}
|
|
173
186
|
|
|
174
187
|
// ===== header =====
|