@subroh0508/marp-theme-canvas 0.0.3 → 0.0.4
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/README.ja.md +314 -0
- package/README.md +314 -0
- package/css/black-canvas.css +24 -5
- package/css/white-canvas.css +24 -5
- package/package.json +13 -3
- package/scss/_index.scss +30 -21
- package/scss/black-canvas.scss +12 -213
- package/scss/component/CLAUDE.md +24 -24
- package/scss/component/_a.scss +1 -1
- package/scss/component/_blockquote.scss +4 -4
- package/scss/component/_code.scss +8 -2
- package/scss/component/_columns.scss +13 -13
- package/scss/component/_footer.scss +1 -1
- package/scss/component/_header.scss +1 -1
- package/scss/component/_heading.scss +1 -1
- package/scss/component/_index.scss +5 -7
- package/scss/component/_pagination.scss +2 -2
- package/scss/component/_section.scss +3 -3
- package/scss/component/_table.scss +2 -2
- package/scss/component/_text-decorator.scss +1 -1
- package/scss/component/prettylights/CLAUDE.md +11 -11
- package/scss/component/prettylights/_base.scss +36 -30
- package/scss/component/prettylights/_dark.scss +9 -3
- package/scss/component/prettylights/_index.scss +5 -7
- package/scss/component/prettylights/_light.scss +9 -3
- package/scss/page/CLAUDE.md +27 -27
- package/scss/page/_agenda.scss +6 -6
- package/scss/page/_display.scss +9 -9
- package/scss/page/_index.scss +4 -6
- package/scss/page/_section.scss +4 -4
- package/scss/page/_title.scss +6 -6
- package/scss/page/_toc.scss +3 -3
- package/scss/theme/CLAUDE.md +110 -0
- package/scss/theme/_black-canvas.scss +243 -0
- package/scss/theme/_white-canvas.scss +243 -0
- package/scss/white-canvas.scss +12 -213
- package/scss/CLAUDE.md +0 -59
package/css/white-canvas.css
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
/*!
|
|
3
|
-
* White Canvas -
|
|
3
|
+
* White Canvas - A simple slide theme with minimal styling
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* - --color-primary:
|
|
7
|
-
* - --color-accent:
|
|
5
|
+
* When using, you must define the following variables in Marp's inline style:
|
|
6
|
+
* - --color-primary: Primary color (e.g., h2 text color)
|
|
7
|
+
* - --color-accent: Accent color (e.g., mark tag background)
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* Example:
|
|
10
10
|
* style: |
|
|
11
11
|
* :root {
|
|
12
12
|
* --color-primary: #3b91c4;
|
|
@@ -18,8 +18,27 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @auto-scaling true
|
|
20
20
|
* @size 16:9 1920px 1080px
|
|
21
|
+
*
|
|
22
|
+
* MIT License
|
|
23
|
+
* Copyright (c) 2026 Subroh Nishikori
|
|
24
|
+
* https://github.com/subroh0508/marp-theme-canvas/blob/main/LICENSE
|
|
25
|
+
*/
|
|
26
|
+
/*!
|
|
27
|
+
* MIT License
|
|
28
|
+
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
29
|
+
* https://github.com/sindresorhus/github-markdown-css/blob/main/license
|
|
21
30
|
*/
|
|
22
31
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap");
|
|
32
|
+
/*!
|
|
33
|
+
* MIT License
|
|
34
|
+
* Copyright (c) 2018 Marp team (marp-team@marp.app)
|
|
35
|
+
* https://github.com/marp-team/marp-core/blob/main/LICENSE
|
|
36
|
+
*/
|
|
37
|
+
/*!
|
|
38
|
+
* MIT License
|
|
39
|
+
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
40
|
+
* https://github.com/sindresorhus/github-markdown-css/blob/main/license
|
|
41
|
+
*/
|
|
23
42
|
:root {
|
|
24
43
|
--color-black: #000;
|
|
25
44
|
--color-white: #fff;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subroh0508/marp-theme-canvas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "A simple Marp theme with minimal styling",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,6 +26,15 @@
|
|
|
26
26
|
"sass": "./scss/black-canvas.scss",
|
|
27
27
|
"style": "./css/black-canvas.css"
|
|
28
28
|
},
|
|
29
|
+
"./scss/white-canvas": {
|
|
30
|
+
"sass": "./scss/theme/_white-canvas.scss"
|
|
31
|
+
},
|
|
32
|
+
"./scss/black-canvas": {
|
|
33
|
+
"sass": "./scss/theme/_black-canvas.scss"
|
|
34
|
+
},
|
|
35
|
+
"./scss/theme/*": {
|
|
36
|
+
"sass": "./scss/theme/*"
|
|
37
|
+
},
|
|
29
38
|
"./scss": {
|
|
30
39
|
"sass": "./scss/_index.scss"
|
|
31
40
|
},
|
|
@@ -67,7 +76,8 @@
|
|
|
67
76
|
"sass": "^1.97.2"
|
|
68
77
|
},
|
|
69
78
|
"scripts": {
|
|
70
|
-
"serve": "marp --allow-local-files --html
|
|
71
|
-
"build": "for f in scss/[!_]*.scss; do sass --no-source-map $f css/$(basename ${f%.scss}.css); done"
|
|
79
|
+
"serve": "marp --allow-local-files --html -s demo",
|
|
80
|
+
"build": "for f in scss/[!_]*.scss; do sass --no-source-map $f css/$(basename ${f%.scss}.css); done",
|
|
81
|
+
"build:demo": "marp --allow-local-files --html --input-dir demo --output public"
|
|
72
82
|
}
|
|
73
83
|
}
|
package/scss/_index.scss
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
@charset "utf-8";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
// Marp Theme Canvas - A simple slide theme with minimal styling
|
|
4
|
+
//
|
|
5
|
+
// Usage:
|
|
6
|
+
// // Import all modules
|
|
7
|
+
// @use '@subroh0508/marp-theme-canvas/scss';
|
|
8
|
+
//
|
|
9
|
+
// // Customize and use theme
|
|
10
|
+
// @use '@subroh0508/marp-theme-canvas/scss/white-canvas' as white-canvas;
|
|
11
|
+
// @include white-canvas.apply() {
|
|
12
|
+
// --color-primary: #e11d48;
|
|
13
|
+
// --color-accent: #fde047;
|
|
14
|
+
// }
|
|
15
|
+
//
|
|
16
|
+
// // Components only
|
|
17
|
+
// @use '@subroh0508/marp-theme-canvas/scss/component';
|
|
18
|
+
//
|
|
19
|
+
// // Specific component
|
|
20
|
+
// @use '@subroh0508/marp-theme-canvas/scss/component/heading';
|
|
21
|
+
//
|
|
22
|
+
// // Page styles only
|
|
23
|
+
// @use '@subroh0508/marp-theme-canvas/scss/page';
|
|
24
|
+
//
|
|
25
|
+
// // Specific page style
|
|
26
|
+
// @use '@subroh0508/marp-theme-canvas/scss/page/title';
|
|
22
27
|
|
|
23
|
-
//
|
|
28
|
+
// Themes
|
|
29
|
+
@forward 'theme/white-canvas' as white-canvas-*;
|
|
30
|
+
@forward 'theme/black-canvas' as black-canvas-*;
|
|
31
|
+
|
|
32
|
+
// Components
|
|
24
33
|
@forward 'component' as component-*;
|
|
25
34
|
|
|
26
|
-
//
|
|
35
|
+
// Page styles
|
|
27
36
|
@forward 'page' as page-*;
|
package/scss/black-canvas.scss
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Black Canvas -
|
|
2
|
+
* Black Canvas - A simple dark slide theme with minimal styling
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* - --color-primary:
|
|
6
|
-
* - --color-accent:
|
|
4
|
+
* When using, you must define the following variables in Marp's inline style:
|
|
5
|
+
* - --color-primary: Primary color (e.g., h2 text color)
|
|
6
|
+
* - --color-accent: Accent color (e.g., mark tag background)
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Example:
|
|
9
9
|
* style: |
|
|
10
10
|
* :root {
|
|
11
11
|
* --color-primary: #3b91c4;
|
|
@@ -17,217 +17,16 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @auto-scaling true
|
|
19
19
|
* @size 16:9 1920px 1080px
|
|
20
|
+
*
|
|
21
|
+
* MIT License
|
|
22
|
+
* Copyright (c) 2026 Subroh Nishikori
|
|
23
|
+
* https://github.com/subroh0508/marp-theme-canvas/blob/main/LICENSE
|
|
20
24
|
*/
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
@use './component/prettylights/dark' as prettylights;
|
|
24
|
-
@use './component/table' as table;
|
|
25
|
-
@use './component/code' as code;
|
|
26
|
-
@use './component/section' as section;
|
|
27
|
-
@use './component/pagination' as pagination;
|
|
28
|
-
@use './component/header' as header;
|
|
29
|
-
@use './component/footer' as footer;
|
|
30
|
-
@use './component/heading' as heading;
|
|
31
|
-
@use './component/blockquote' as blockquote;
|
|
32
|
-
@use './component/text-decorator' as text-decorator;
|
|
33
|
-
@use './component/columns' as columns;
|
|
34
|
-
@use './component/a' as a;
|
|
35
|
-
|
|
36
|
-
// ===== ページスタイル =====
|
|
37
|
-
@use './page/title' as page-title;
|
|
38
|
-
@use './page/section' as page-section;
|
|
39
|
-
@use './page/toc' as page-toc;
|
|
40
|
-
@use './page/agenda' as page-agenda;
|
|
41
|
-
@use './page/display' as page-display;
|
|
26
|
+
@use './theme/black-canvas' as theme;
|
|
42
27
|
|
|
43
28
|
// ===== Google Fonts =====
|
|
44
29
|
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');
|
|
45
30
|
|
|
46
|
-
// =====
|
|
47
|
-
|
|
48
|
-
// --- 色(白黒) ---
|
|
49
|
-
--color-black: #000;
|
|
50
|
-
--color-white: #fff;
|
|
51
|
-
|
|
52
|
-
// --- 色(グレースケール 7色): Tailwind slate 50-300, 800-950 ---
|
|
53
|
-
--color-grey-lightest: #f8fafc; // slate-50
|
|
54
|
-
--color-grey-lighter: #f1f5f9; // slate-100
|
|
55
|
-
--color-grey-light: #e2e8f0; // slate-200
|
|
56
|
-
--color-grey-medium: #cbd5e1; // slate-300
|
|
57
|
-
--color-grey-dark: #1e293b; // slate-800
|
|
58
|
-
--color-grey-darker: #0f172a; // slate-900
|
|
59
|
-
--color-grey-darkest: #020617; // slate-950
|
|
60
|
-
|
|
61
|
-
// --- 色(コンポーネント: blockquote) ---
|
|
62
|
-
--color-blockquote-background: color-mix(in srgb, var(--color-grey-light) 15%, transparent);
|
|
63
|
-
--color-blockquote-mark: var(--color-grey-medium);
|
|
64
|
-
--color-blockquote-text: var(--color-grey-medium);
|
|
65
|
-
|
|
66
|
-
// --- 色(コンポーネント: table) ---
|
|
67
|
-
--color-table-row-bg: var(--color-grey-darkest);
|
|
68
|
-
--color-table-row-bg-header: var(--color-grey-dark);
|
|
69
|
-
--color-table-border: var(--color-grey-medium);
|
|
70
|
-
|
|
71
|
-
// --- 色(コンポーネント: code) ---
|
|
72
|
-
--color-code-bg: color-mix(in srgb, var(--color-grey-light) 15%, transparent);
|
|
73
|
-
--color-code-fg: var(--color-grey-lightest);
|
|
74
|
-
|
|
75
|
-
// --- 色(コンポーネント: link) ---
|
|
76
|
-
--color-link: #60a5fa; // Tailwind blue-400
|
|
77
|
-
|
|
78
|
-
// --- フォント ---
|
|
79
|
-
--font-family-base: 'Noto Sans JP', sans-serif;
|
|
80
|
-
--font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
|
|
81
|
-
|
|
82
|
-
// --- フォントサイズ ---
|
|
83
|
-
--font-size-base: 40px;
|
|
84
|
-
--font-size-display: 2.5em;
|
|
85
|
-
--font-size-title: 2em;
|
|
86
|
-
--font-size-heading: 1.3em;
|
|
87
|
-
--font-size-medium: 1.15em;
|
|
88
|
-
--font-size-body: 1em;
|
|
89
|
-
--font-size-small: 0.85em;
|
|
90
|
-
--font-size-note: 0.7em;
|
|
91
|
-
|
|
92
|
-
// --- フォントウェイト ---
|
|
93
|
-
--font-weight-normal: 400;
|
|
94
|
-
--font-weight-bold: 700;
|
|
95
|
-
--font-weight-black: 900;
|
|
96
|
-
|
|
97
|
-
// --- 行間 ---
|
|
98
|
-
--line-height-tight: 1.2;
|
|
99
|
-
--line-height-normal: 1.45;
|
|
100
|
-
--line-height-loose: 2;
|
|
101
|
-
|
|
102
|
-
// --- レイアウト ---
|
|
103
|
-
--slide-padding-x: 80px;
|
|
104
|
-
--slide-padding-y: 80px;
|
|
105
|
-
--header-footer-margin-x: 80px;
|
|
106
|
-
--header-footer-margin-y: 20px;
|
|
107
|
-
--border-radius: 8px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// ===== section(スライド本体) =====
|
|
111
|
-
section {
|
|
112
|
-
@include prettylights.configure;
|
|
113
|
-
@include section.configure(
|
|
114
|
-
$width: 1920px,
|
|
115
|
-
$height: 1080px,
|
|
116
|
-
$padding-x: var(--slide-padding-x),
|
|
117
|
-
$padding-y: var(--slide-padding-y),
|
|
118
|
-
$color-bg: var(--color-grey-darkest),
|
|
119
|
-
$color-text: var(--color-white),
|
|
120
|
-
$font-family: var(--font-family-base),
|
|
121
|
-
$font-size: var(--font-size-base),
|
|
122
|
-
$line-height: var(--line-height-normal),
|
|
123
|
-
$list-indent: 1.3em
|
|
124
|
-
);
|
|
125
|
-
@include pagination.configure(
|
|
126
|
-
$margin-x: var(--header-footer-margin-x),
|
|
127
|
-
$margin-y: var(--header-footer-margin-y),
|
|
128
|
-
$font-size: var(--font-size-note),
|
|
129
|
-
$color-text: var(--color-grey-light)
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
// ===== ページスタイル =====
|
|
133
|
-
@include page-title.configure(
|
|
134
|
-
$font-size-title: var(--font-size-display),
|
|
135
|
-
$color-metadata-text: var(--color-grey-medium)
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
@include page-section.configure(
|
|
139
|
-
$font-size: var(--font-size-title)
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
@include page-toc.configure(
|
|
143
|
-
$font-size: var(--font-size-heading),
|
|
144
|
-
$line-height: var(--line-height-loose)
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
@include page-agenda.configure(
|
|
148
|
-
$font-size-heading: var(--font-size-heading),
|
|
149
|
-
$font-size-body: var(--font-size-body),
|
|
150
|
-
$line-height-heading: var(--line-height-loose),
|
|
151
|
-
$line-height-body: var(--line-height-normal),
|
|
152
|
-
$font-weight-heading: var(--font-weight-bold),
|
|
153
|
-
$font-weight-body: var(--font-weight-normal)
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
@include page-display.configure(
|
|
157
|
-
$font-size: var(--font-size-display),
|
|
158
|
-
$font-weight-bold: var(--font-weight-bold),
|
|
159
|
-
$font-weight-normal: var(--font-weight-normal)
|
|
160
|
-
);
|
|
161
|
-
|
|
162
|
-
// ===== カラムレイアウト =====
|
|
163
|
-
@include columns.configure();
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// ===== header =====
|
|
167
|
-
@include header.configure(
|
|
168
|
-
$margin-x: var(--header-footer-margin-x),
|
|
169
|
-
$margin-y: var(--header-footer-margin-y),
|
|
170
|
-
$font-size: var(--font-size-note),
|
|
171
|
-
$color-text: var(--color-grey-light)
|
|
172
|
-
);
|
|
173
|
-
|
|
174
|
-
// ===== footer =====
|
|
175
|
-
@include footer.configure(
|
|
176
|
-
$margin-x: var(--header-footer-margin-x),
|
|
177
|
-
$margin-y: var(--header-footer-margin-y),
|
|
178
|
-
$font-size: var(--font-size-note),
|
|
179
|
-
$color-text: var(--color-grey-light)
|
|
180
|
-
);
|
|
181
|
-
|
|
182
|
-
// ===== 見出し(h1-h6) =====
|
|
183
|
-
@include heading.configure(
|
|
184
|
-
$line-height: var(--line-height-tight),
|
|
185
|
-
$font-size-h1: var(--font-size-title),
|
|
186
|
-
$font-size-h2: var(--font-size-heading),
|
|
187
|
-
$font-size-h3: var(--font-size-medium),
|
|
188
|
-
$font-weight-h1: var(--font-weight-bold),
|
|
189
|
-
$font-weight-h2: var(--font-weight-bold),
|
|
190
|
-
$font-weight-h3: var(--font-weight-bold),
|
|
191
|
-
$font-weight-h4: var(--font-weight-bold),
|
|
192
|
-
$font-weight-h5: var(--font-weight-normal),
|
|
193
|
-
$font-weight-h6: var(--font-weight-normal),
|
|
194
|
-
$color-text-h2: var(--color-primary)
|
|
195
|
-
);
|
|
196
|
-
|
|
197
|
-
// ===== 引用(blockquote) =====
|
|
198
|
-
@include blockquote.configure(
|
|
199
|
-
$font-size: var(--font-size-body),
|
|
200
|
-
$line-height: var(--line-height-tight),
|
|
201
|
-
$color-text: var(--color-blockquote-text),
|
|
202
|
-
$color-bg: var(--color-blockquote-background),
|
|
203
|
-
$color-mark: var(--color-blockquote-mark),
|
|
204
|
-
$border-radius: var(--border-radius)
|
|
205
|
-
);
|
|
206
|
-
|
|
207
|
-
// ===== テキスト装飾(strong, mark, rp) =====
|
|
208
|
-
@include text-decorator.configure(
|
|
209
|
-
$font-weight-bold: var(--font-weight-bold),
|
|
210
|
-
$font-weight-normal: var(--font-weight-normal),
|
|
211
|
-
$color-text-highlight: var(--color-accent)
|
|
212
|
-
);
|
|
213
|
-
|
|
214
|
-
// ===== リンク(a) =====
|
|
215
|
-
@include a.configure(
|
|
216
|
-
$color-text: var(--color-link)
|
|
217
|
-
);
|
|
218
|
-
|
|
219
|
-
// ===== table =====
|
|
220
|
-
@include table.configure(
|
|
221
|
-
$color-row-bg: var(--color-table-row-bg),
|
|
222
|
-
$color-header-bg: var(--color-table-row-bg-header),
|
|
223
|
-
$color-even-row-bg: var(--color-table-row-bg),
|
|
224
|
-
$color-border-vert: var(--color-table-border),
|
|
225
|
-
$color-border-horz: var(--color-table-border)
|
|
226
|
-
);
|
|
227
|
-
|
|
228
|
-
// ===== code =====
|
|
229
|
-
@include code.configure(
|
|
230
|
-
$font-mono: var(--font-family-mono),
|
|
231
|
-
$color-bg: var(--color-code-bg),
|
|
232
|
-
$color-fg: var(--color-code-fg)
|
|
233
|
-
);
|
|
31
|
+
// ===== Apply theme =====
|
|
32
|
+
@include theme.apply;
|
package/scss/component/CLAUDE.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
# component
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Styles for elements commonly used across slides
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## File Structure
|
|
6
6
|
|
|
7
7
|
```scss
|
|
8
|
-
// =====
|
|
9
|
-
//
|
|
8
|
+
// ===== _filename.scss =====
|
|
9
|
+
// Component description
|
|
10
10
|
|
|
11
|
-
@mixin configure(
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
@mixin configure($arg1, $arg2, $arg3: default) {
|
|
12
|
+
selector {
|
|
13
|
+
property: value;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Usage from Theme
|
|
19
19
|
|
|
20
|
-
### section
|
|
20
|
+
### Components used within section
|
|
21
21
|
|
|
22
22
|
```scss
|
|
23
23
|
section {
|
|
@@ -27,7 +27,7 @@ section {
|
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### Components used in global scope
|
|
31
31
|
|
|
32
32
|
```scss
|
|
33
33
|
@include header.configure(...);
|
|
@@ -39,17 +39,17 @@ section {
|
|
|
39
39
|
@include code.configure(...);
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
| `_section.scss` | `section` |
|
|
47
|
-
| `_heading.scss` | `h1`-`h6` |
|
|
48
|
-
| `_header.scss` | `header` |
|
|
49
|
-
| `_footer.scss` | `footer` |
|
|
50
|
-
| `_pagination.scss` | `section::after` |
|
|
51
|
-
| `_table.scss` | `table`, `th`, `td`, `tr` |
|
|
52
|
-
| `_code.scss` | `code`, `pre`, `tt` |
|
|
53
|
-
| `_blockquote.scss` | `blockquote` |
|
|
54
|
-
| `_text-decorator.scss` | `strong`, `mark`, `rp` |
|
|
55
|
-
| `prettylights/*` | `.hljs-*` |
|
|
42
|
+
## Existing Components
|
|
43
|
+
|
|
44
|
+
| File | Target Selector | Purpose |
|
|
45
|
+
|------|-----------------|---------|
|
|
46
|
+
| `_section.scss` | `section` | Base styles for slide body |
|
|
47
|
+
| `_heading.scss` | `h1`-`h6` | Headings |
|
|
48
|
+
| `_header.scss` | `header` | Header |
|
|
49
|
+
| `_footer.scss` | `footer` | Footer |
|
|
50
|
+
| `_pagination.scss` | `section::after` | Page number |
|
|
51
|
+
| `_table.scss` | `table`, `th`, `td`, `tr` | Table |
|
|
52
|
+
| `_code.scss` | `code`, `pre`, `tt` | Code blocks |
|
|
53
|
+
| `_blockquote.scss` | `blockquote` | Blockquote |
|
|
54
|
+
| `_text-decorator.scss` | `strong`, `mark`, `rp` | Text decoration |
|
|
55
|
+
| `prettylights/*` | `.hljs-*` | Syntax highlighting |
|
package/scss/component/_a.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ===== _blockquote.scss =====
|
|
2
|
-
// Marp
|
|
2
|
+
// Blockquote styles for Marp slides
|
|
3
3
|
|
|
4
4
|
@mixin configure($font-size, $line-height, $color-text, $color-bg, $color-mark, $border-radius) {
|
|
5
5
|
blockquote {
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
background: $color-bg;
|
|
15
15
|
border-radius: $border-radius;
|
|
16
16
|
|
|
17
|
-
//
|
|
17
|
+
// Top-left quotation mark
|
|
18
18
|
&::before {
|
|
19
|
-
content:
|
|
19
|
+
content: "\201C";
|
|
20
20
|
position: absolute;
|
|
21
21
|
left: 0.2em;
|
|
22
22
|
font-size: 2em;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
color: $color-mark;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
//
|
|
27
|
+
// Adjust margin for child elements
|
|
28
28
|
> :first-child {
|
|
29
29
|
margin-top: 0;
|
|
30
30
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
// ===== _code.scss =====
|
|
2
|
-
//
|
|
3
|
-
// github-markdown-css v5.8.1
|
|
2
|
+
// Code block styles
|
|
3
|
+
// Modified from github-markdown-css v5.8.1
|
|
4
4
|
// https://github.com/sindresorhus/github-markdown-css/blob/v5.8.1/github-markdown.css
|
|
5
5
|
|
|
6
|
+
/*!
|
|
7
|
+
* MIT License
|
|
8
|
+
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
9
|
+
* https://github.com/sindresorhus/github-markdown-css/blob/main/license
|
|
10
|
+
*/
|
|
11
|
+
|
|
6
12
|
@mixin configure($font-mono, $color-bg, $color-fg) {
|
|
7
13
|
code, tt {
|
|
8
14
|
font-family: $font-mono;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// ===== _columns.scss =====
|
|
2
|
-
// Flexbox
|
|
2
|
+
// Flexbox-based column layout component
|
|
3
3
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
4
|
+
// Usage 1: _class: columns (entire slide uses column layout)
|
|
5
|
+
// Usage 2: <div class="columns"> (partial column layout)
|
|
6
6
|
//
|
|
7
|
-
//
|
|
7
|
+
// Note: Add blank lines before/after div tags for proper Markdown parsing
|
|
8
8
|
|
|
9
|
-
$_column-widths: (2, 3, 4, 6, 7, 8);
|
|
9
|
+
$_column-widths: (1, 2, 3, 4, 6, 7, 8, 9, 10);
|
|
10
10
|
|
|
11
|
-
//
|
|
12
|
-
// - flex: $n ...
|
|
13
|
-
//
|
|
14
|
-
// - min-width: 0 ...
|
|
15
|
-
//
|
|
16
|
-
// - > *, p > * { max-width: 100% } ...
|
|
11
|
+
// Common styles for column elements
|
|
12
|
+
// - flex: $n ... Ratio-based width (distributed considering gap)
|
|
13
|
+
// e.g., column-4 + column-6 = 4:6 ratio distribution
|
|
14
|
+
// - min-width: 0 ... Override flex child default (auto) to maintain
|
|
15
|
+
// flex-basis width regardless of content size
|
|
16
|
+
// - > *, p > * { max-width: 100% } ... Constrain children and paragraph elements (images etc.) to column width
|
|
17
17
|
@mixin _column-children {
|
|
18
18
|
> .column {
|
|
19
19
|
flex: 1;
|
|
@@ -39,14 +39,14 @@ $_column-widths: (2, 3, 4, 6, 7, 8);
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
@mixin configure() {
|
|
42
|
-
//
|
|
42
|
+
// Usage 1: _class: columns (section itself becomes flex container)
|
|
43
43
|
&.columns {
|
|
44
44
|
flex-direction: row;
|
|
45
45
|
gap: 1em;
|
|
46
46
|
@include _column-children;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// Usage 2: <div class="columns"> (partial column layout)
|
|
50
50
|
.columns {
|
|
51
51
|
display: flex;
|
|
52
52
|
gap: 1em;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@charset "utf-8";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @use '@subroh0508/marp-theme-canvas/scss/component/heading';
|
|
8
|
-
*/
|
|
3
|
+
// Components - Styles for elements used across all slides
|
|
4
|
+
//
|
|
5
|
+
// @use '@subroh0508/marp-theme-canvas/scss/component';
|
|
6
|
+
// @use '@subroh0508/marp-theme-canvas/scss/component/heading';
|
|
9
7
|
|
|
10
8
|
@forward 'a' as a-*;
|
|
11
9
|
@forward 'blockquote' as blockquote-*;
|
|
@@ -19,5 +17,5 @@
|
|
|
19
17
|
@forward 'table' as table-*;
|
|
20
18
|
@forward 'text-decorator' as text-decorator-*;
|
|
21
19
|
|
|
22
|
-
//
|
|
20
|
+
// Syntax highlighting
|
|
23
21
|
@forward 'prettylights' as prettylights-*;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ===== _pagination.scss =====
|
|
2
|
-
// Marp
|
|
3
|
-
// Marp
|
|
2
|
+
// Page number styles for Marp slides (section::after)
|
|
3
|
+
// Displayed when Marp's paginate: true is specified
|
|
4
4
|
|
|
5
5
|
@mixin configure($margin-x, $margin-y, $font-size, $color-text) {
|
|
6
6
|
&::after {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ===== _section.scss =====
|
|
2
|
-
// Marp
|
|
2
|
+
// Styles for Marp slide section (body)
|
|
3
3
|
|
|
4
4
|
@mixin configure(
|
|
5
5
|
$width,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
box-sizing: border-box;
|
|
27
27
|
overflow: hidden;
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// Reset margin-top for content elements
|
|
30
30
|
p,
|
|
31
31
|
ul,
|
|
32
32
|
ol,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
margin-top: 0;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// Adjust list indentation
|
|
39
39
|
ul,
|
|
40
40
|
ol {
|
|
41
41
|
padding-inline-start: $list-indent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ===== _table.scss =====
|
|
2
|
-
//
|
|
3
|
-
// github-markdown-css v5.8.1
|
|
2
|
+
// Table styles
|
|
3
|
+
// Modified from github-markdown-css v5.8.1
|
|
4
4
|
// https://github.com/sindresorhus/github-markdown-css/blob/v5.8.1/github-markdown.css
|
|
5
5
|
|
|
6
6
|
@mixin configure($color-row-bg, $color-header-bg, $color-even-row-bg, $color-border-vert, $color-border-horz) {
|