2020-02-20 21:37:10 +08:00
|
|
|
// Author: Sivan [sun.sivan@gmail.com]
|
|
|
|
// Description: list styles.
|
2020-02-11 20:47:29 +08:00
|
|
|
@import "variables";
|
|
|
|
|
|
|
|
@mixin hetiList {
|
|
|
|
// 标准化间距
|
|
|
|
ul,
|
|
|
|
ol,
|
|
|
|
dl {
|
2021-09-16 11:09:08 +08:00
|
|
|
margin-block-start: $line-height-size-normal * 0.5;
|
2020-02-11 20:47:29 +08:00
|
|
|
margin-block-end: $line-height-size-normal;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul,
|
|
|
|
ol {
|
2020-02-18 19:51:44 +08:00
|
|
|
padding-inline-start: $text-indent-size;
|
2020-02-11 20:47:29 +08:00
|
|
|
|
|
|
|
ul,
|
|
|
|
ol {
|
|
|
|
margin-block-start: 0;
|
|
|
|
margin-block-end: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-20 21:37:10 +08:00
|
|
|
// 兼容性处理
|
|
|
|
/// 重置部分 CSS Reset 中 ul, ol { list-style: none; } 造成的样式污染
|
|
|
|
/// 如果搭配 normalize.css 使用,则不存在这些样式污染
|
2020-02-11 20:47:29 +08:00
|
|
|
@if $_css-reset-scheme == "reset" {
|
|
|
|
ul {
|
|
|
|
list-style-type: disc;
|
|
|
|
}
|
|
|
|
|
|
|
|
ol {
|
|
|
|
list-style-type: decimal;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul ul,
|
|
|
|
ol ul {
|
|
|
|
list-style-type: circle;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul ul ul,
|
|
|
|
ul ol ul,
|
|
|
|
ol ul ul,
|
|
|
|
ol ol ul {
|
|
|
|
list-style-type: square;
|
|
|
|
}
|
|
|
|
|
|
|
|
// 重置不知道哪里散播出来的垃圾代码 ul, li { list-style: none; }
|
|
|
|
li {
|
|
|
|
list-style-type: unset;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|