hexo-theme-keep/source/css/layout/common/basic.styl

122 lines
2.1 KiB
Stylus
Raw Normal View History

@require 'variables.styl'
2020-04-01 12:09:06 +08:00
@require 'animated.styl'
@require 'magic-theme.styl'
2020-09-03 12:28:24 +08:00
// ============================
// scrollbar
// ============================
* {
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.32);
2020-09-03 12:28:24 +08:00
}
&::-webkit-scrollbar-track {
background: transparent;
}
}
// ============================
// html, body
// ============================
html, body {
margin: 0;
padding: 0;
color: var(--normal-text-color);
if (hexo-config('magic.enable') == true) {
background: var(--magic-background-color);
} else {
background: var(--background-color);
}
2020-09-03 12:28:24 +08:00
font-family: $default-font-family;
font-weight: $default-font-weight;
2020-09-03 12:28:24 +08:00
font-size: $default-font-size;
2020-04-01 22:42:24 +08:00
line-height: $default-font-line-height;
2020-09-03 12:28:24 +08:00
+ils-tablet() {
font-size: 0.99em;
line-height: $default-font-line-height - 2px;
}
+ils-mobile() {
font-size: 0.98em;
line-height: $default-font-line-height - 4px;
}
}
2020-09-01 19:21:28 +08:00
2020-09-03 12:28:24 +08:00
// ============================
// selection
// ============================
::selection {
background: var(--selection-color);
color: #fff;
}
2020-09-01 19:21:28 +08:00
2020-09-03 12:28:24 +08:00
// ============================
// ul, ol, li
// ============================
ul, ol, li {
padding: 0;
margin: 0;
list-style: none;
}
2020-09-03 12:28:24 +08:00
// ============================
// a
// ============================
a {
text-decoration: none;
color: var(--normal-text-color);
2020-09-03 12:28:24 +08:00
&:hover, &:active {
color: var(--primary-color);
}
}
2020-09-03 12:28:24 +08:00
// ============================
// button
// ============================
button {
padding: 0;
margin: 0;
border: 0;
outline: none;
cursor: pointer;
background: transparent;
}
.btn {
display: inline-block;
position: relative;
text-align: center;
cursor: pointer;
white-space: nowrap;
border-radius: 5px;
padding: 0.5em 1em;
background: var(--background-color);
2020-04-25 11:16:58 +08:00
if (hexo-config('magic.enable') == true) {
2020-04-30 00:14:16 +08:00
magic-style(1.1, 1.1);
2020-04-25 11:16:58 +08:00
} else {
border: 1px solid var(--border-color);
2020-04-25 11:16:58 +08:00
}
&:hover {
2020-04-25 11:16:58 +08:00
transition();
color: var(--background-color);
background: var(--primary-color);
}
2020-09-01 19:21:28 +08:00
}