heti/lib/modifiers/font-stack.scss

61 lines
1,017 B
SCSS
Raw Normal View History

2020-02-20 21:37:10 +08:00
// Author: Sivan [sun.sivan@gmail.com]
// Description: define global font stacks.
2020-02-11 21:01:13 +08:00
@import "../variables";
2020-02-11 20:47:29 +08:00
@mixin hetiFontModifier {
2020-02-11 21:01:13 +08:00
// 定义默认采用无衬线字体
2020-02-11 20:47:29 +08:00
// 定义无衬线字体为黑体
2020-02-11 21:01:13 +08:00
&,
&--sans {
2020-02-11 20:47:29 +08:00
font-family: $font-family-hei;
}
// 定义衬线字体为宋体
2020-02-11 21:01:13 +08:00
&--serif {
2020-02-11 20:47:29 +08:00
font-family: $font-family-song;
}
// 定义传统字体
2020-02-11 21:01:13 +08:00
&--classic {
// 正文使用宋体
2020-02-11 20:47:29 +08:00
font-family: $font-family-song;
// 标题使用楷体 800 字重
2020-02-11 20:47:29 +08:00
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $font-family-kai-black;
2020-02-11 20:47:29 +08:00
font-weight: $font-weight-bolder;
}
// 引用使用楷体
2020-02-11 20:47:29 +08:00
blockquote,
cite,
q {
font-family: $font-family-kai;
}
2020-02-11 21:01:13 +08:00
// 说明文字、表头使用黑体
2020-02-11 20:47:29 +08:00
figcaption,
caption,
th {
font-family: $font-family-hei;
}
}
&--hei {
font-family: $font-family-hei;
}
&--song {
font-family: $font-family-song;
}
&--kai {
font-family: $font-family-kai;
}
2020-02-11 20:47:29 +08:00
}