heti/lib/_base.scss

94 lines
2 KiB
SCSS
Raw Normal View History

2020-02-20 21:37:10 +08:00
// Author: Sivan [sun.sivan@gmail.com]
// Description: base reset and entry styles.
2020-02-11 20:47:29 +08:00
@import "variables";
@mixin hetiBase {
// 清容器浮动
@include clear-float();
// 清容器内首尾元素外边距
&,
section,
td {
> *:first-child {
margin-block-start: 0 !important;
}
> *:last-child {
margin-block-end: 0 !important;
}
}
// 定义块级元素样式
blockquote {
margin-block-start: $std-block-unit / 2;
margin-block-end: $std-block-unit;
margin-inline-start: $std-inline-unit * 2;
margin-inline-end: $std-inline-unit * 2;
padding-block-start: $std-block-unit / 2;
padding-block-end: $std-block-unit / 2;
padding-inline-start: $std-inline-unit;
padding-inline-end: $std-inline-unit;
background-color: rgba(0, 0, 0, 0.054);
//border-radius: 4px;
}
figure {
display: block;
text-align: center;
> img {
display: block;
margin-inline-start: auto;
margin-inline-end: auto;
}
}
hr {
width: 30%;
height: 1px;
margin-block-start: $std-block-unit * 2;
margin-block-end: $std-block-unit * 2 - 1px;
margin-inline-start: auto;
margin-inline-end: auto;
border: 0;
background-color: #ddd;
}
p {
margin-block-start: $std-block-unit / 2;
margin-block-end: $std-block-unit;
text-align: justify;
@include non-cjk-block {
2020-02-11 21:01:13 +08:00
text-align: start;
2020-02-11 20:47:29 +08:00
}
}
pre {
margin-block-start: $std-block-unit / 2;
margin-block-end: $std-block-unit / 2;
margin-inline-start: 0;
margin-inline-end: 0;
padding-block-start: $std-block-unit / 2;
padding-block-end: $std-block-unit / 2;
padding-inline-start: $std-inline-unit;
padding-inline-end: $std-inline-unit;
overflow: auto;
2020-02-11 21:01:13 +08:00
font-family: $font-family-mono;
2020-02-11 20:47:29 +08:00
white-space: pre;
word-wrap: normal;
background-color: rgba(0, 0, 0, 0.054);
border-radius: 4px;
2020-02-14 17:49:40 +08:00
code {
margin: 0;
2020-02-14 17:49:40 +08:00
padding: 0;
border: 0;
border-radius: 0;
background-color: transparent;
color: inherit;
}
2020-02-11 20:47:29 +08:00
}
}