This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
redemption/source/css/base/_base.scss
7Wate 91bab4d153
refacotr(css): Refactor css for easy maintenance
1. Refactored CSS for robustness
2. Add dark-mode choose
3. Add sans and serif
2022-01-17 19:51:11 +08:00

150 lines
2.2 KiB
SCSS

@import "variables";
// 滚动条
html {
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-thumb {
height: 40px;
border-radius: 16px;
// 浅色
background-color: rgba(0, 0, 0, 0.249);
@include darkmode {
// 深色
background-color: blue;
}
}
::-webkit-scrollbar-thumb {
&:hover {
// 浅色
background-color: rgba(0, 0, 0, 0.249);
@include darkmode {
// 深色
background-color: blue;
}
}
}
}
// body
body {
// 浅色
background-color: #f7f7f7;
color: #333333;
// 深色
@include darkmode {
background-color: #3d3d3d;
color: #a3a3a3;
}
}
// container
.container {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
}
// main
main {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
width: 52rem;
margin-top: 4rem;
padding-bottom: 3rem;
// 浅色
background: #ffffff;
box-shadow: 0 0.375rem 1rem -0.5rem rgb(0, 0, 0,0.17);
// 深色
@include darkmode {
background: #292929;
box-shadow: 0 0.375rem 1rem -0.5rem rgb(0, 0, 0,0.34);
}
}
// pages
main > .index,
main > .archives,
main > .categories,
main > .category,
main > .links,
main > .post,
main > .tag,
main > .journals {
width: 45rem;
padding: 1rem 0.1rem 1rem 0.1rem;
}
.menu{
position: fixed;
right: 0.5rem;
bottom: 10rem;
}
.close {
display: none;
}
/*animation starts*/
@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-3px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeInDown {
0% {
opacity: 0;
-moz-transform: translateY(-3px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-o-keyframes fadeInDown {
0% {
opacity: 0;
-o-transform: translateY(-3px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeInDown {
0% {
opacity: 0;
transform: translateY(-3px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
/*animation ends*/