2020-03-21 23:04:01 +08:00
|
|
|
@require 'variables.styl'
|
2020-04-01 12:09:06 +08:00
|
|
|
@require 'animated.styl'
|
2020-03-21 23:04:01 +08:00
|
|
|
|
|
|
|
html, body {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2020-04-02 20:37:34 +08:00
|
|
|
color: var(--normal-text-color);
|
|
|
|
background: var(--background-color);
|
2020-03-21 23:04:01 +08:00
|
|
|
font-size: $default-font-size;
|
|
|
|
font-family: $default-font-family;
|
|
|
|
font-weight: $default-font-weight;
|
2020-04-01 22:42:24 +08:00
|
|
|
line-height: $default-font-line-height;
|
|
|
|
-webkit-font-smoothing antialiased;
|
2020-04-02 20:37:34 +08:00
|
|
|
transition: all 0.5s ease;
|
2020-03-21 23:04:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ul, li, ol {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
2020-03-22 20:31:13 +08:00
|
|
|
button {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
border: 0;
|
|
|
|
outline: none;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
2020-03-21 23:04:01 +08:00
|
|
|
p {
|
|
|
|
line-height: 2em;
|
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
text-decoration: none;
|
2020-04-02 20:37:34 +08:00
|
|
|
color: var(--normal-text-color);
|
2020-03-21 23:04:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
a:hover, a:active {
|
2020-04-01 22:42:24 +08:00
|
|
|
color: $primary-color;
|
2020-03-21 23:04:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 预设的按钮样式
|
|
|
|
.btn {
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
|
|
|
text-align: center;
|
|
|
|
cursor: pointer;
|
|
|
|
color: $button-color;
|
2020-04-01 22:42:24 +08:00
|
|
|
border: 1px solid $border-color;
|
2020-03-21 23:04:01 +08:00
|
|
|
white-space: nowrap;
|
|
|
|
border-radius: 10em;
|
|
|
|
padding: 0.5em 1em;
|
|
|
|
|
|
|
|
&:hover {
|
2020-04-01 22:42:24 +08:00
|
|
|
color: $primary-color;
|
|
|
|
border: 1px solid $primary-color;
|
2020-03-21 23:04:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-01 17:55:34 +08:00
|
|
|
|
2020-03-21 23:04:01 +08:00
|
|
|
// 文章标题悬浮动画
|
|
|
|
.article-title-hover-animation {
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
2020-04-02 20:37:34 +08:00
|
|
|
color: var(--second-text-color);
|
2020-03-21 23:04:01 +08:00
|
|
|
border-bottom: none;
|
|
|
|
line-height: 1.3;
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 2px;
|
2020-04-01 16:41:30 +08:00
|
|
|
bottom: -4px;
|
2020-03-21 23:04:01 +08:00
|
|
|
left: 0;
|
2020-04-02 20:37:34 +08:00
|
|
|
background-color: var(--second-text-color);
|
2020-03-21 23:04:01 +08:00
|
|
|
visibility: hidden;
|
|
|
|
transform: scaleX(0);
|
|
|
|
the-transition();
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover::before {
|
|
|
|
visibility: visible;
|
|
|
|
transform: scaleX(1);
|
|
|
|
}
|
2020-04-02 20:37:34 +08:00
|
|
|
|
2020-03-27 20:45:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/
|
|
|
|
clearfix() {
|
|
|
|
&:before,
|
|
|
|
&:after {
|
|
|
|
content: " ";
|
|
|
|
display: table;
|
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
clear: both;
|
|
|
|
}
|
2020-04-01 17:55:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
::selection {
|
2020-04-01 22:42:24 +08:00
|
|
|
background: $primary-color;
|
2020-04-01 17:55:34 +08:00
|
|
|
color: #fff;
|
2020-03-21 23:04:01 +08:00
|
|
|
}
|