heti/lib/modifiers/ancient.scss

59 lines
1.2 KiB
SCSS
Raw Normal View History

2020-02-20 21:37:10 +08:00
// Author: Sivan [sun.sivan@gmail.com]
// Description: define ancient styles.
2020-02-11 21:01:13 +08:00
@import "../variables";
@mixin hetiAncientModifier {
// 定义古文、古诗样式
&--ancient,
&--poetry {
// 古文、古诗用宋体(覆盖全局字体)
font-family: $font-family-song;
// 古文标题用楷体(覆盖全局字体)
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $font-family-kai-black;
2020-02-11 21:01:13 +08:00
font-weight: $font-weight-bolder;
text-align: center;
// 标题内元信息仅在桌面端采取悬挂处理,且不占据空间影响文字居中
#{$root-selector}-meta {
font-weight: $font-weight-normal;
2020-02-11 21:01:13 +08:00
@media screen and (min-width: 640px) {
@include hang();
display: inline;
margin-block-start: 4px;
margin-inline-start: 8px;
}
}
}
#{$root-selector}-meta {
line-height: $line-height-size-normal;
text-align: center;
text-indent: 0;
}
}
&--ancient {
// 古文(文言文、词)首行缩进
p {
text-indent: $text-indent-length;
}
}
&--poetry {
// 诗节无缩进,居中显示
p {
text-align: center;
text-indent: 0;
}
}
}