File tree Expand file tree Collapse file tree 4 files changed +30
-25
lines changed
Expand file tree Collapse file tree 4 files changed +30
-25
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ const postcss = require("postcss");
55const cssnano = require ( "cssnano" ) ;
66const { rollup } = require ( "rollup" ) ;
77const virtual = require ( "@rollup/plugin-virtual" ) ;
8- const themes = require ( "../../static/js/themes" ) ;
98const pkg = require ( '../../package.json' ) ;
109const _ = require ( "lodash" )
1110const prefixer = require ( 'postcss-prefix-selector' )
@@ -14,6 +13,8 @@ const toRootPrefix = "../../";
1413const fromRoot = ( pathFromRoot ) => toRootPrefix + pathFromRoot ;
1514const filePath = ( file ) => path . join ( __dirname , `${ file } ` ) ;
1615
16+ const themes = require ( fromRoot ( "src/themes/config" ) ) ;
17+
1718const buildScss = async ( { distPath, minify } ) => {
1819 fs . ensureDirSync ( filePath ( distPath + "/js" ) )
1920
File renamed without changes.
Original file line number Diff line number Diff line change 11@import " prism.scss" ;
22
3+ /*
4+ * 包含 markdown 的常见元素,各个属性通过 scss 变量控制;
5+ * 增加了一些 CSS Reset 代码;
6+ * 默认值使用 chrome 的默认样式,见 variables/default.scss。
7+ */
8+
9+ // html、body 标签适用于 MWeb(html 中只包含 markdown 内容)
10+ // 在用于 jujin 等网站时,需要转为 .markdown-body
311html {
412 font-family : $font-family ;
513 font-size : $font-size ;
Original file line number Diff line number Diff line change 11/*
22 * Default theme
33 * 这个文件只应该包含变量
4+ * 取值参考 chrome user agent stylesheet:
5+ * https://chromium.googlesource.com/chromium/blink/+/refs/heads/main/Source/core/css/html.css
46 */
57
68/* color */
@@ -52,30 +54,24 @@ $md-body-mg-v: 0px;
5254$md-body-pd-h : 3.2rem ;
5355$md-body-pd-v : 1.6rem ;
5456
55- $h1-mg-v : 0.67em ;
56- $h1-mg-t : $h1-mg-v ;
57- $h1-mg-b : $h1-mg-v ;
58- $h2-mg-v : 0.83em ;
59- $h2-mg-t : $h2-mg-v ;
60- $h2-mg-b : $h2-mg-v ;
61- $h3-mg-v : 1em ;
62- $h3-mg-t : $h3-mg-v ;
63- $h3-mg-b : $h3-mg-v ;
64- $h4-mg-v : 1.33em ;
65- $h4-mg-t : $h4-mg-v ;
66- $h4-mg-b : $h4-mg-v ;
67- $h5-mg-v : 1.67em ;
68- $h5-mg-t : $h5-mg-v ;
69- $h5-mg-b : $h5-mg-v ;
70- $h6-mg-v : 2.33em ;
71- $h6-mg-t : $h6-mg-v ;
72- $h6-mg-b : $h6-mg-v ;
73- $block-mg-t : 1em ;
74- $block-mg-b : 1em ;
75- $th-pd-v : 1px ;
76- $th-pd-h : 1px ;
77- $td-pd-v : 1px ;
78- $td-pd-h : 1px ;
57+ $block-mg-t : 0.75em ;
58+ $block-mg-b : 0.75em ;
59+ $h1-mg-t : 2 * $block-mg-t ;
60+ $h1-mg-b : $block-mg-b ;
61+ $h2-mg-t : 2 * $block-mg-t ;
62+ $h2-mg-b : $block-mg-b ;
63+ $h3-mg-t : 2 * $block-mg-t ;
64+ $h3-mg-b : $block-mg-b ;
65+ $h4-mg-t : 2 * $block-mg-t ;
66+ $h4-mg-b : $block-mg-b ;
67+ $h5-mg-t : 2 * $block-mg-t ;
68+ $h5-mg-b : $block-mg-b ;
69+ $h6-mg-t : 2 * $block-mg-t ;
70+ $h6-mg-b : $block-mg-b ;
71+ $th-pd-v : 2px ;
72+ $th-pd-h : 4px ;
73+ $td-pd-v : 2px ;
74+ $td-pd-h : 4px ;
7975$li-mg-t : .25em ;
8076
8177/* elememts */
You can’t perform that action at this time.
0 commit comments