diff --git a/dist/heti.css b/dist/heti.css new file mode 100644 index 0000000..ba9382a --- /dev/null +++ b/dist/heti.css @@ -0,0 +1,750 @@ +@charset "UTF-8"; +/*! + * Project: Heti + * URL: https://github.com/sivan/heti + * Author: Sivan [sun.sivan@gmail.com] + */ +@font-face { + font-family: "Heti Hei"; + src: local("PingFang SC Regular"), local("PingFang TC Regular"), local("Hiragino Sans GB W3"), local("Heiti SC Regular"), local("Heiti TC Regular"), local("Microsoft YaHei"), local("Microsoft Jhenghei"), local("Source Han Sans CN Regular"), local("Source Han Sans HK Regular"), local("Source Han Sans TW Regular"), local("Source Han Sans JP Regular"), local("Source Han Sans KR Regular"), local("Noto Sans CJK SC Regular"), local("Noto Sans CJK TC Regular"), local("Noto Sans CJK JP Regular"), local("Noto Sans CJK KR Regular"), local("WenQuanYi Micro Hei"), local("Droid Sans Fallback"); +} + +@font-face { + font-family: "Heti Hei"; + font-weight: 200; + src: local("PingFang SC Light"), local("PingFang TC Light"), local("Heiti SC Light"), local("Heiti TC Light"), local("Microsoft YaHei Light"), local("Microsoft Jhenghei Light"), local("Source Han Sans CN Light"), local("Source Han Sans HK Light"), local("Source Han Sans TW Light"), local("Source Han Sans JP Light"), local("Source Han Sans KR Light"), local("Noto Sans CJK SC Light"), local("Noto Sans CJK TC Light"), local("Noto Sans CJK JP Light"), local("Noto Sans CJK KR Light"); +} + +@font-face { + font-family: "Heti Hei"; + font-weight: 600; + src: local("PingFang SC Medium"), local("Hiragino Sans GB W6"), local("PingFang TC Medium"), local("Heiti SC Medium"), local("Heiti TC Medium"), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local("Source Han Sans CN Bold"), local("Source Han Sans HK Bold"), local("Source Han Sans TW Bold"), local("Source Han Sans JP Bold"), local("Source Han Sans KR Bold"), local("Noto Sans CJK SC Bold"), local("Noto Sans CJK TC Bold"), local("Noto Sans CJK JP Bold"), local("Noto Sans CJK KR Bold"); +} + +@font-face { + font-family: "Heti Hei Black"; + font-weight: 800; + src: local("Lantinghei SC Heavy"), local("Lantinghei TC Heavy"), local("PingFang SC Semibold"), local("PingFang TC Semibold"), local("Hiragino Sans GB W6"), local("Heiti SC Medium"), local("Heiti TC Medium"), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local("Source Han Sans CN Heavy"), local("Source Han Sans HK Heavy"), local("Source Han Sans TW Heavy"), local("Source Han Sans JP Heavy"), local("Source Han Sans KR Heavy"), local("Noto Sans CJK SC Heavy"), local("Noto Sans CJK TC Heavy"), local("Noto Sans CJK JP Heavy"), local("Noto Sans CJK KR Heavy"), local("Droid Sans Fallback"); +} + +@font-face { + font-family: "Heti Song"; + src: local("Songti SC Regular"), local("Songti TC Regular"), local("SimSun"); +} + +@font-face { + font-family: "Heti Song"; + font-weight: 200; + src: local("Songti SC Light"), local("Songti TC Light"), local(STSong), local("SimSun"); +} + +@font-face { + font-family: "Heti Song"; + font-weight: 600; + src: local("Songti SC Bold"), local("Songti TC Bold"), local("SimSun"); +} + +@font-face { + font-family: "Heti Song Black"; + font-weight: 800; + src: local("Songti SC Black"), local("SimSun"); +} + +@font-face { + font-family: "Heti Kai"; + src: local("Kaiti SC Regular"), local("Kaiti TC Regular"), local("BiauKai"); +} + +@font-face { + font-family: "Heti Kai"; + font-weight: 600; + src: local("Kaiti SC Bold"), local("Kaiti TC Bold"); +} + +@font-face { + font-family: "Heti Kai Black"; + font-weight: 800; + src: local("Kaiti SC Black"), local("Kaiti TC Black"); +} + +.heti { + max-width: 42em; + font-size: 16px; + font-weight: 400; + line-height: 1.5; +} + +.heti::before, .heti::after { + content: ""; + display: table; +} + +.heti::after { + clear: both; +} + +.heti > *:first-child, +.heti section > *:first-child, +.heti td > *:first-child { + margin-block-start: 0 !important; +} + +.heti > *:last-child, +.heti section > *:last-child, +.heti td > *:last-child { + margin-block-end: 0 !important; +} + +.heti blockquote { + margin-block-start: 12px; + margin-block-end: 24px; + margin-inline-start: 32px; + margin-inline-end: 32px; + padding-block-start: 12px; + padding-block-end: 12px; + padding-inline-start: 16px; + padding-inline-end: 16px; + background-color: rgba(0, 0, 0, 0.054); +} + +.heti figure { + display: block; + text-align: center; +} + +.heti figure > img { + display: block; + margin-inline-start: auto; + margin-inline-end: auto; +} + +.heti hr { + width: 30%; + height: 1px; + margin-block-start: 48px; + margin-block-end: 47px; + margin-inline-start: auto; + margin-inline-end: auto; + border: 0; + background-color: #ddd; +} + +.heti p { + margin-block-start: 12px; + margin-block-end: 24px; + text-align: justify; +} + +.heti p:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti p:not(:lang(zh)) { + text-align: start; +} + +.heti pre { + margin-block-start: 12px; + margin-block-end: 12px; + margin-inline-start: 0; + margin-inline-end: 0; + padding-block-start: 12px; + padding-block-end: 12px; + padding-inline-start: 16px; + padding-inline-end: 16px; + overflow: auto; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + white-space: pre; + word-wrap: normal; + background-color: rgba(0, 0, 0, 0.054); + border-radius: 4px; +} + +.heti pre code { + margin: 0; + padding: 0; + border: 0; + border-radius: 0; + background-color: transparent; + color: inherit; +} + +.heti h1, +.heti h2, +.heti h3, +.heti h4, +.heti h5, +.heti h6 { + position: relative; + margin: 0; + margin-block-start: 24px; + margin-block-end: 12px; + font-weight: 600; +} + +.heti h1 { + margin-block-end: 24px; + font-size: 32px; + line-height: 48px; + letter-spacing: 1.6px; +} + +.heti h2 { + font-size: 24px; + line-height: 36px; + letter-spacing: 1.2px; +} + +.heti h3 { + font-size: 20px; + line-height: 36px; + letter-spacing: 1px; +} + +.heti h4 { + font-size: 18px; + line-height: 24px; +} + +.heti h5 { + font-size: 16px; + line-height: 24px; +} + +.heti h6 { + font-size: 14px; + line-height: 24px; +} + +.heti h1 + h2, +.heti h2 + h3, +.heti h3 + h4, +.heti h4 + h5, +.heti h5 + h6 { + margin-block-start: 12px; +} + +.heti ul, +.heti ol, +.heti dl { + margin-block-start: 12px; + margin-block-end: 24px; +} + +.heti ul, +.heti ol { + padding-inline-start: 32px; +} + +.heti ul ul, +.heti ul ol, +.heti ol ul, +.heti ol ol { + margin-block-start: 0; + margin-block-end: 0; +} + +.heti ul { + list-style-type: disc; +} + +.heti ol { + list-style-type: decimal; +} + +.heti ul ul, +.heti ol ul { + list-style-type: circle; +} + +.heti ul ul ul, +.heti ul ol ul, +.heti ol ul ul, +.heti ol ol ul { + list-style-type: square; +} + +.heti li { + list-style-type: unset; +} + +.heti table { + box-sizing: border-box; + table-layout: fixed; + border-collapse: collapse; + border: 1px solid #ccc; + margin-block-start: 12px; + margin-block-end: 24px; + margin-inline-start: auto; + margin-inline-end: auto; + word-break: break-word; +} + +.heti th, +.heti td { + border: 1px solid #ccc; + padding-block-start: 6px; + padding-block-end: 6px; + padding-inline-start: 8px; + padding-inline-end: 8px; +} + +.heti caption { + caption-side: bottom; + margin-block-start: 2px; + margin-block-end: -4px; + font-size: 14px; + line-height: 24px; +} + +.heti a { + text-decoration: none; +} + +.heti a:hover { + padding-block-end: 1px; + border-block-end: 1px solid currentColor; + text-decoration: none; +} + +.heti abbr[title] { + padding-block-end: 1px; + border-block-end: 1px dotted; + text-decoration: none; + cursor: help; +} + +.heti b, +.heti strong { + font-weight: 600; +} + +.heti code { + margin-inline-start: 0.25em; + margin-inline-end: 0.25em; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 0.875em; +} + +.heti dfn { + font-weight: 600; +} + +.heti dfn:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti dfn:not(:lang(zh)) { + font-weight: 400; +} + +.heti em { + font-weight: 600; +} + +.heti figcaption { + display: inline-block; + vertical-align: top; + font-size: 14px; + text-align: start; +} + +.heti i { + font-style: italic; +} + +.heti ins, +.heti u { + padding-block-end: 1px; + border-block-end: 1px solid; + text-decoration: none; +} + +.heti mark { + padding-block-start: 2px; + padding-block-end: 2px; + padding-inline-start: 1px; + padding-inline-end: 1px; + margin-inline-start: 1px; + margin-inline-end: 1px; + background-color: rgba(255, 247, 0, 0.88); +} + +.heti q { + quotes: "「" "」" "『" "』"; +} + +.heti q:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti q:not(:lang(zh)) { + quotes: initial; + quotes: auto; +} + +.heti rt { + font-size: 0.875em; + color: rgba(0, 0, 0, 0.88); +} + +.heti small { + font-size: 0.875em; +} + +.heti strong { + font-weight: 600; +} + +.heti sub, +.heti sup { + position: relative; + margin-inline-start: 0.25em; + margin-inline-end: 0.25em; + font-size: 0.75em; + font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + line-height: 1; + vertical-align: baseline; +} + +.heti sub { + bottom: -0.25em; +} + +.heti sup { + top: -0.5em; +} + +.heti summary { + padding-inline-start: 1em; + outline: 0; + cursor: pointer; +} + +.heti summary::-webkit-details-marker { + width: 0.6em; + margin-inline-end: 0.4em; +} + +.heti u[title] { + cursor: help; + border-block-end-color: rgba(0, 0, 0, 0.54); + border-block-end-width: 3px; + border-block-end-style: double; +} + +.heti address, +.heti cite, +.heti dfn, +.heti dt, +.heti em { + font-style: normal; +} + +.heti address:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti address:not(:lang(zh)), +.heti cite:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), +.heti cite:not(:lang(zh)), +.heti dfn:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), +.heti dfn:not(:lang(zh)), +.heti dt:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), +.heti dt:not(:lang(zh)), +.heti em:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), +.heti em:not(:lang(zh)) { + font-style: italic; +} + +.heti abbr[title], +.heti del, +.heti ins, +.heti s, +.heti u { + margin-inline-start: 1px; + margin-inline-end: 1px; +} + +.heti, .heti--sans { + font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--serif { + font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--classic { + font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--classic h1, +.heti--classic h2, +.heti--classic h3, +.heti--classic h4, +.heti--classic h5, +.heti--classic h6 { + font-family: "Times New Roman", Times, "Heti Kai Black", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: 800; +} + +.heti--classic blockquote, +.heti--classic cite, +.heti--classic q { + font-family: "Times New Roman", Times, "Heti Kai", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--classic figcaption, +.heti--classic caption, +.heti--classic th { + font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--hei { + font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--song { + font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--kai { + font-family: "Times New Roman", Times, "Heti Kai", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--columns-1, .heti--columns-2, .heti--columns-3, .heti--columns-4, .heti--columns-16em, .heti--columns-20em, .heti--columns-24em, .heti--columns-28em, .heti--columns-32em, .heti--columns-36em, .heti--columns-40em, .heti--columns-44em, .heti--columns-48em, .heti comma { + max-width: none; + column-gap: 2em; +} + +.heti--columns-1 p, .heti--columns-2 p, .heti--columns-3 p, .heti--columns-4 p, .heti--columns-16em p, .heti--columns-20em p, .heti--columns-24em p, .heti--columns-28em p, .heti--columns-32em p, .heti--columns-36em p, .heti--columns-40em p, .heti--columns-44em p, .heti--columns-48em p, .heti comma p { + margin-block-start: 6px; + margin-block-end: 12px; + text-indent: 2em; +} + +.heti--columns-1 { + column-count: 1; +} + +.heti--columns-2 { + column-count: 2; +} + +.heti--columns-3 { + column-count: 3; +} + +.heti--columns-4 { + column-count: 4; +} + +.heti--columns-16em { + column-width: 16em; +} + +.heti--columns-20em { + column-width: 20em; +} + +.heti--columns-24em { + column-width: 24em; +} + +.heti--columns-28em { + column-width: 28em; +} + +.heti--columns-32em { + column-width: 32em; +} + +.heti--columns-36em { + column-width: 36em; +} + +.heti--columns-40em { + column-width: 40em; +} + +.heti--columns-44em { + column-width: 44em; +} + +.heti--columns-48em { + column-width: 48em; +} + +.heti--vertical { + max-width: none; + max-height: 42em; + writing-mode: vertical-rl; + letter-spacing: 0.125em; +} + +.heti--vertical h1, +.heti--vertical h2, +.heti--vertical h3, +.heti--vertical h4, +.heti--vertical h5, +.heti--vertical h6 { + text-align: start; +} + +.heti--ancient, .heti--poetry { + font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.heti--ancient h1, +.heti--ancient h2, +.heti--ancient h3, +.heti--ancient h4, +.heti--ancient h5, +.heti--ancient h6, .heti--poetry h1, +.heti--poetry h2, +.heti--poetry h3, +.heti--poetry h4, +.heti--poetry h5, +.heti--poetry h6 { + font-family: "Times New Roman", Times, "Heti Kai Black", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: 800; + text-align: center; +} + +.heti--ancient h1 .heti-meta, +.heti--ancient h2 .heti-meta, +.heti--ancient h3 .heti-meta, +.heti--ancient h4 .heti-meta, +.heti--ancient h5 .heti-meta, +.heti--ancient h6 .heti-meta, .heti--poetry h1 .heti-meta, +.heti--poetry h2 .heti-meta, +.heti--poetry h3 .heti-meta, +.heti--poetry h4 .heti-meta, +.heti--poetry h5 .heti-meta, +.heti--poetry h6 .heti-meta { + font-weight: 400; +} + +@media screen and (min-width: 640px) { + .heti--ancient h1 .heti-meta, + .heti--ancient h2 .heti-meta, + .heti--ancient h3 .heti-meta, + .heti--ancient h4 .heti-meta, + .heti--ancient h5 .heti-meta, + .heti--ancient h6 .heti-meta, .heti--poetry h1 .heti-meta, + .heti--poetry h2 .heti-meta, + .heti--poetry h3 .heti-meta, + .heti--poetry h4 .heti-meta, + .heti--poetry h5 .heti-meta, + .heti--poetry h6 .heti-meta { + position: absolute; + line-height: inherit; + text-indent: 0; + display: inline; + margin-block-start: 4px; + margin-inline-start: 8px; + } +} + +.heti--ancient .heti-meta, .heti--poetry .heti-meta { + line-height: 24px; + text-align: center; + text-indent: 0; +} + +.heti--ancient p { + text-indent: 2em; +} + +.heti--poetry p { + text-align: center; + text-indent: 0; +} + +.heti--annotation p { + margin-block-start: 0; + margin-block-end: 0; + line-height: 2.25; + text-indent: 2em; +} + +.heti--annotation em { + -webkit-text-emphasis: filled circle; + -webkit-text-emphasis-position: under; + font-weight: 400; +} + +.heti--annotation em:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti--annotation em:not(:lang(zh)) { + -webkit-text-emphasis: none; +} + +.heti--annotation .heti-meta { + margin-block-start: 12px; + margin-block-end: 24px; +} + +.heti .heti-meta { + display: block; + text-indent: 0; +} + +.heti .heti-verse { + text-align: center; + text-indent: 0; +} + +.heti .heti-large { + font-size: 18px; + line-height: 24px; +} + +.heti .heti-x-large { + font-size: 20px; + line-height: 30px; +} + +.heti .heti-small { + font-size: 14px; + line-height: 24px; +} + +.heti .heti-x-small { + font-size: 12px; + line-height: 18px; +} + +.heti .heti-list-latin { + list-style-type: upper-latin; +} + +.heti .heti-list-latin ol { + list-style-type: lower-roman; +} + +.heti .heti-list-latin ol ol { + list-style-type: lower-latin; +} + +.heti .heti-list-han { + list-style-type: cjk-ideographic; +} + +.heti .heti-list-han ol { + list-style-type: decimal; +} + +.heti .heti-list-han ol ol { + list-style-type: decimal-leading-zero; +} + +.heti .heti-fn { + margin-block-start: 59px; + border-block-start: 1px solid #ccc; + font-size: 14px; + font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + line-height: 24px; +} + +.heti .heti-fn ol { + margin-block-start: 12px; + margin-block-end: 0; +} + +.heti .heti-hang { + position: absolute; + line-height: inherit; + text-indent: 0; +} + +.heti .heti-em { + -webkit-text-emphasis: filled circle; + -webkit-text-emphasis-position: under; +} + +.heti .heti-em:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti .heti-em:not(:lang(zh)) { + -webkit-text-emphasis: none; +} diff --git a/lib/_base.scss b/lib/_base.scss index 3dde340..ff2f6f2 100644 --- a/lib/_base.scss +++ b/lib/_base.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: base reset and entry styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: base reset and entry styles. @import "variables"; @mixin hetiBase { diff --git a/lib/_font.scss b/lib/_font.scss index c9737e3..7dcd4a0 100644 --- a/lib/_font.scss +++ b/lib/_font.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: define font-face. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define font-face. @import "fonts/hei"; @import "fonts/song"; @import "fonts/kai"; diff --git a/lib/_heading.scss b/lib/_heading.scss index 67b3718..06e32f4 100644 --- a/lib/_heading.scss +++ b/lib/_heading.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: heading styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: heading styles. @import "variables"; @mixin hetiHeading { diff --git a/lib/_inline.scss b/lib/_inline.scss index a213084..d5201a1 100644 --- a/lib/_inline.scss +++ b/lib/_inline.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: inline element styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: inline element styles. @import "variables"; @mixin hetiInline { diff --git a/lib/_list.scss b/lib/_list.scss index 5a4ee6e..f4163cd 100644 --- a/lib/_list.scss +++ b/lib/_list.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: list styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: list styles. @import "variables"; @mixin hetiList { @@ -24,9 +22,9 @@ } } - /* 兼容性处理 */ - // 重置部分 CSS Reset 中 ul, ol { list-style: none; } 造成的样式污染 - // 如果搭配 normalize.css 使用,则不存在这些样式污染 + // 兼容性处理 + /// 重置部分 CSS Reset 中 ul, ol { list-style: none; } 造成的样式污染 + /// 如果搭配 normalize.css 使用,则不存在这些样式污染 @if $_css-reset-scheme == "reset" { ul { list-style-type: disc; diff --git a/lib/_table.scss b/lib/_table.scss index 1cc642f..0f5c704 100644 --- a/lib/_table.scss +++ b/lib/_table.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: table styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: table styles. @import "variables"; @mixin hetiTable { diff --git a/lib/_variables.scss b/lib/_variables.scss index a4a56fd..b5aa499 100644 --- a/lib/_variables.scss +++ b/lib/_variables.scss @@ -1,12 +1,10 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: define variables, alias etc. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define variables, alias etc. // 定义赫蹏根 class 名 $root-selector: '.heti' !default; -/* 字体 Fonts */ +// 字体 Fonts // 字体栈 Font Stacks $_font-stack-sans: "Helvetica Neue", Helvetica, Arial !default; $_font-stack-serif: "Times New Roman", Times !default; @@ -42,7 +40,7 @@ $font-size-h4: 18px !default; $font-size-h5: 16px !default; $font-size-h6: 14px !default; -/* 行 Lines */ +// 行 Lines // 行宽 $line-length: 42em !default; @@ -65,7 +63,7 @@ $line-height-size-h4: 24px !default; $line-height-size-h5: 24px !default; $line-height-size-h6: 24px !default; -/* 段落 Paragraphs */ +// 段落 Paragraphs // 标准网格单位变量 Standard Length // 垂直方向标准单位 = 标准行高 // 水平方向标准单位 = 标准字号 @@ -76,18 +74,18 @@ $std-inline-unit: $font-size-normal !default; $text-indent-length: 2em !default; $text-indent-size: $font-size-normal * 2 !default; -/* 栏 Columns */ +// 栏 Columns // 分栏 $column-count-list: (1, 2, 3, 4) !default; $column-width-list: (16em, 20em, 24em, 28em, 32em, 36em, 40em, 44em, 48em) !default; -/* 开发用配置项 Develop Configs */ -// 预设重置方案 -// `reset`:假定 Eric Meyer 的 CSS Reset 或其它流行的 Reset -// `normalize`:指定为 normalize.css +// 开发用配置项 Develop Configs +/// 预设重置方案 +/// `reset`:假定 Eric Meyer 的 CSS Reset 或其它流行的 Reset +/// `normalize`:指定为 normalize.css $_css-reset-scheme: "reset"; -/* 混合 Mix-ins */ +// 混合 Mix-ins // Mix-in: Clear float @mixin clear-float { &::before, @@ -116,7 +114,7 @@ $_css-reset-scheme: "reset"; text-indent: 0; } -/* 函数 Functions */ +// 函数 Functions // Function: batch prefix/suffix list-item // batch-fix-list((2, 3), '#{$root-selector}--columns-') => (.heti--columns-2, .heti--columns-3) @function batch-fix-list($list, $prefix: '', $suffix: '') { diff --git a/lib/fonts/_hei.scss b/lib/fonts/_hei.scss index cae3c8a..cb958d9 100644 --- a/lib/fonts/_hei.scss +++ b/lib/fonts/_hei.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: define font-face Heti Hei. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define font-face Heti Hei. // 标准 Regular @font-face { diff --git a/lib/fonts/_kai.scss b/lib/fonts/_kai.scss index 1f4e7c1..581e56b 100644 --- a/lib/fonts/_kai.scss +++ b/lib/fonts/_kai.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: define font-face Heti Kai. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define font-face Heti Kai. // 标准 Regular @font-face { diff --git a/lib/fonts/_song.scss b/lib/fonts/_song.scss index dffa78d..b5b8f3b 100644 --- a/lib/fonts/_song.scss +++ b/lib/fonts/_song.scss @@ -1,7 +1,5 @@ -/** - * Author: Sivan [sun.sivan@gmail.com] - * Description: define font-face Heti Song. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define font-face Heti Song. // 标准 Regular @font-face { diff --git a/lib/helpers/_block.scss b/lib/helpers/_block.scss index 17653e8..ff38621 100644 --- a/lib/helpers/_block.scss +++ b/lib/helpers/_block.scss @@ -1,11 +1,9 @@ -/* - * Author: Sivan [sun.sivan@gmail.com] - * Description: define block helper classes. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define block helper classes. @import "../variables"; @mixin hetiBlockHelperClasses { - /* 段落相关 */ + // 段落相关 // 元信息无缩进 #{$root-selector}-meta { display: block; @@ -41,7 +39,7 @@ } } - /* 列表相关 */ + // 列表相关 // 定义拉丁字母的有序列表 #{$root-selector}-list-latin { list-style-type: upper-latin; @@ -68,7 +66,7 @@ } } - /* 页脚 */ + // 页脚 #{$root-selector}-fn { margin-block-start: 59px; border-block-start: 1px solid #ccc; diff --git a/lib/helpers/_inline.scss b/lib/helpers/_inline.scss index 9dca81e..e823f15 100644 --- a/lib/helpers/_inline.scss +++ b/lib/helpers/_inline.scss @@ -1,7 +1,5 @@ -/* - * Author: Sivan [sun.sivan@gmail.com] - * Description: define inline helper classes. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define inline helper classes. @import "../variables"; @mixin hetiInlineHelperClasses { diff --git a/lib/heti.scss b/lib/heti.scss index 9608cdb..bef827f 100644 --- a/lib/heti.scss +++ b/lib/heti.scss @@ -3,7 +3,6 @@ * URL: https://github.com/sivan/heti * Author: Sivan [sun.sivan@gmail.com] */ - @import "font"; @import "variables"; @import "base"; diff --git a/lib/modifiers/ancient.scss b/lib/modifiers/ancient.scss index bd5e05c..a3ed921 100644 --- a/lib/modifiers/ancient.scss +++ b/lib/modifiers/ancient.scss @@ -1,7 +1,5 @@ -/* - * Author: Sivan [sun.sivan@gmail.com] - * Description: define ancient styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define ancient styles. @import "../variables"; @mixin hetiAncientModifier { diff --git a/lib/modifiers/annotation.scss b/lib/modifiers/annotation.scss index 6a51150..230990b 100644 --- a/lib/modifiers/annotation.scss +++ b/lib/modifiers/annotation.scss @@ -1,7 +1,5 @@ -/* - * Author: Sivan [sun.sivan@gmail.com] - * Description: define interlinear annotation styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define interlinear annotation styles. @import "../variables"; @mixin hetiAnnotationModifier { diff --git a/lib/modifiers/column.scss b/lib/modifiers/column.scss index 6c6d11b..d4acc12 100644 --- a/lib/modifiers/column.scss +++ b/lib/modifiers/column.scss @@ -1,7 +1,5 @@ -/* - * Author: Sivan [sun.sivan@gmail.com] - * Description: define column styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define column styles. @import "../variables"; @mixin hetiColumnModifier { diff --git a/lib/modifiers/font-stack.scss b/lib/modifiers/font-stack.scss index 4aee106..f315fed 100644 --- a/lib/modifiers/font-stack.scss +++ b/lib/modifiers/font-stack.scss @@ -1,7 +1,5 @@ -/* - * Author: Sivan [sun.sivan@gmail.com] - * Description: define global font stacks. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define global font stacks. @import "../variables"; @mixin hetiFontModifier { diff --git a/lib/modifiers/writing-mode.scss b/lib/modifiers/writing-mode.scss index f2f587c..a949c58 100644 --- a/lib/modifiers/writing-mode.scss +++ b/lib/modifiers/writing-mode.scss @@ -1,7 +1,5 @@ -/* - * Author: Sivan [sun.sivan@gmail.com] - * Description: define writing mode styles. - */ +// Author: Sivan [sun.sivan@gmail.com] +// Description: define writing mode styles. @import "../variables"; @mixin hetiWritingModeModifier { diff --git a/package.json b/package.json index 416e898..46fabc6 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,9 @@ }, "scripts": { "start": "node-sass -w --output-style=compressed lib/heti.scss demo/heti.min.css", - "build": "node-sass lib/heti.scss dist/heti.min.css --output-style=compressed", + "build:expanded": "node-sass lib/heti.scss dist/heti.css --output-style=expanded", + "build:compressed": "node-sass lib/heti.scss dist/heti.min.css --output-style=compressed", + "build": "npm run build:expanded && npm run build:compressed", "deploy": "gh-pages -d demo", "test": "npx stylelint --config .stylelintrc 'lib/**/*.scss'" },