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

132 lines
2.2 KiB
Stylus
Raw Normal View History

@require 'variables.styl'
2020-04-01 12:09:06 +08:00
@require 'animated.styl'
@require 'keep-theme.styl'
2020-09-03 12:28:24 +08:00
// ============================
// html, body
// ============================
html, body {
margin: 0;
padding: 0;
2020-11-18 11:56:47 +08:00
color: var(--default-text-color);
2020-11-13 14:43:22 +08:00
background: var(--background-color);
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
2020-11-20 12:02:22 +08:00
+keep-tablet() {
2020-11-18 11:15:03 +08:00
font-size: $default-font-size * 0.96;
line-height: $default-font-line-height * 0.96;
2020-09-03 12:28:24 +08:00
}
2020-11-20 12:02:22 +08:00
+keep-mobile() {
2020-11-13 14:43:22 +08:00
font-size: $default-font-size * 0.9;
line-height: $default-font-line-height * 0.9;
2020-09-03 12:28:24 +08:00
}
}
2020-09-01 19:21:28 +08:00
2020-12-01 16:51:38 +08:00
// ============================
// scrollbar
// ============================
* {
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-thumb {
background: var(--scroll-bar-color);
}
&::-webkit-scrollbar-track {
background: var(--scroll-bar-bg-color);
}
}
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-12-01 16:51:38 +08:00
2020-09-03 12:28:24 +08:00
// ============================
// a
// ============================
a {
text-decoration: none;
2020-11-18 11:56:47 +08:00
color: var(--default-text-color);
2020-09-03 12:28:24 +08:00
&:hover, &:active {
color: var(--primary-color);
text-decoration: none !important;
2020-09-03 12:28:24 +08:00
}
}
2020-12-01 16:51:38 +08:00
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;
2020-12-01 16:51:38 +08:00
padding: 8px 16px;
background: var(--background-color);
2020-11-13 14:43:22 +08:00
hover-style(1.1, 1.1);
&: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
}
2020-11-19 11:58:54 +08:00
// ============================
// flex center
// ============================
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
2020-12-01 16:51:38 +08:00
// ============================
// clear float
// ============================
.clear {
clear: both;
}