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/pages/_category.scss

171 lines
3.0 KiB
SCSS
Raw Normal View History

2022-01-19 17:34:41 +08:00
/*
*
* 分类页面
*
* 按照顺序
* 1.默认
* 2.深色
* 3.媒体查询
* - 320px
*/
@import "../base/variables";
.category {
>ul {
>.name {
font-size: 1.5rem;
font-weight: bold;
line-height: 2.2rem;
color: #262626;
}
>li {
display: flex;
font-size: 0.875rem;
2022-01-19 17:34:41 +08:00
line-height: 2rem;
>a {
color: #595959;
&:hover {
color: #59595980;
}
2022-01-19 17:34:41 +08:00
}
2022-01-19 17:34:41 +08:00
>span {
color: #8c8c8c;
}
}
}
// =========== 深色 ===========
@include darkmode {
>ul {
>.name {
color: #dbdbdb;
}
>li {
>a {
color: #dbdbdb;
&:hover {
color: #dbdbdb80;
}
}
2022-01-19 17:34:41 +08:00
>span {
color: #7d7d7d;
}
}
}
}
2022-01-19 17:34:41 +08:00
// =========== 320px 设备 ===========
@media (max-width: 320px) {
>ul {
padding: 2.5% 1%;
>.name {
padding: 2.5% 0;
text-align: center;
}
>li {
justify-content: center;
>span {
display: none;
}
}
}
}
2022-01-19 18:53:46 +08:00
// =========== 768px 设备 ===========
@media (min-width: 320px) and (max-width: 768px) {
>ul {
padding: 2.5% 1%;
>.name {
padding: 2.5% 0;
}
>li {
justify-content: space-between;
}
}
}
}
2022-01-19 17:34:41 +08:00
// 分类目录
.categories {
>ul {
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
>li {
font-size: 1rem;
>a {
color: #262626;
&:hover {
color: #26262680;
}
>span {
color: #8c8c8c;
}
}
}
.count {
display: inline-block;
position: relative;
top: -0.5rem;
right: -0.125rem;
font-size: 0.75rem;
}
}
2022-01-19 17:34:41 +08:00
// =========== 深色 ===========
@include darkmode {
>ul {
>li {
>a {
color: #dbdbdb;
&:hover {
color: #dbdbdb80;
}
}
}
}
}
// =========== 320px 设备 ===========
@media (max-width: 320px) {
margin: 7% 0;
2022-01-19 18:53:46 +08:00
>ul {
>li {
margin: 2.5% 2.5%;
}
}
}
// =========== 768px 设备 ===========
@media (min-width: 320px) and (max-width: 768px) {
margin: 7% 0;
2022-01-19 17:34:41 +08:00
>ul {
>li {
margin: 2.5% 2.5%;
}
}
}
}