heti/lib/_heading.scss

74 lines
1.3 KiB
SCSS
Raw Normal View History

2020-02-20 21:37:10 +08:00
// Author: Sivan [sun.sivan@gmail.com]
// Description: heading styles.
2020-02-11 20:47:29 +08:00
@import "variables";
@mixin hetiHeading {
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
// 顶边距默认为一行间距,且不因边距重叠原因减半
// 底边距考虑到亲密性,默认为半行间距
2020-02-11 21:01:13 +08:00
margin: 0;
2020-02-11 20:47:29 +08:00
margin-block-start: $std-block-unit;
margin-block-end: $std-block-unit / 2;
font-weight: $font-weight-bold;
}
h1 {
margin-block-end: $std-block-unit;
font-size: $font-size-h1;
line-height: $line-height-size-h1;
}
h2 {
font-size: $font-size-h2;
line-height: $line-height-size-h2;
}
h3 {
font-size: $font-size-h3;
line-height: $line-height-size-h3;
}
h4 {
font-size: $font-size-h4;
line-height: $line-height-size-h4;
}
h5 {
font-size: $font-size-h5;
line-height: $line-height-size-h5;
}
h6 {
font-size: $font-size-h6;
line-height: $line-height-size-h6;
}
2020-02-21 01:49:22 +08:00
h1,
h2,
h3 {
// 中文大标题增加微小文字间距
letter-spacing: 0.05em;
// 非中文时不加间距
@include non-cjk-block {
letter-spacing: 0;
}
}
2020-02-11 20:47:29 +08:00
// 压缩两个标题之间的间距
h1 + h2,
h2 + h3,
h3 + h4,
h4 + h5,
h5 + h6 {
margin-block-start: $std-block-unit / 2;
}
}