style: format stylus file code

This commit is contained in:
XPoet 2022-09-30 11:36:38 +08:00
parent 9bfeda06a2
commit 622f5d1b2b
17 changed files with 43 additions and 41 deletions

View File

@ -1,7 +1,7 @@
@import "code-theme.styl" @import "code-theme.styl"
$code-block { $code-block {
margin 20px 0 margin 1.5rem 0
padding 0 padding 0
overflow auto overflow auto
color var(--highlight-foreground) color var(--highlight-foreground)
@ -17,17 +17,17 @@ code {
} }
code { code {
padding 5px padding 0.4rem
color var(--code-foreground) color var(--code-foreground)
font-size 0.96rem font-size 0.96rem
word-wrap break-word word-wrap break-word
background var(--code-background) background var(--code-background)
border-radius 2px border-radius 0.2rem
} }
pre { pre {
@extend $code-block @extend $code-block
padding 10px padding 0.6rem
code { code {
padding 0 padding 0
@ -39,11 +39,11 @@ pre {
.highlight { .highlight {
@extend $code-block @extend $code-block
border-radius 1px border-radius 0.1rem
pre { pre {
margin 0 margin 0
padding 10px 0 padding 0.6rem 0
border none border none
} }
@ -78,8 +78,8 @@ pre {
} }
.gutter pre { .gutter pre {
padding-right 10px padding-right 0.6rem
padding-left 10px padding-left 0.6rem
color var(--highlight-gutter-color) color var(--highlight-gutter-color)
text-align center text-align center
background-color var(--highlight-gutter-bg-color) background-color var(--highlight-gutter-bg-color)
@ -87,13 +87,13 @@ pre {
.code pre { .code pre {
width 100% width 100%
padding-right 10px padding-right 0.6rem
padding-left 10px padding-left 0.6rem
background-color var(--highlight-background) background-color var(--highlight-background)
} }
.line { .line {
height 20px height 1.5rem
color var(--default-text-color) color var(--default-text-color)
.attr { .attr {

View File

@ -73,8 +73,8 @@ $article-date-font-size = 1rem
.article-date { .article-date {
float right float right
font-size $article-date-font-size
color var(--default-text-color) color var(--default-text-color)
font-size $article-date-font-size
} }
} }
} }

View File

@ -2,9 +2,9 @@
position relative position relative
box-sizing border-box box-sizing border-box
width 100% width 100%
overflow hidden
font-size 1rem font-size 1rem
background var(--second-background-color) background var(--second-background-color)
overflow hidden
&::after { &::after {
position absolute position absolute

View File

@ -2,7 +2,7 @@
font-size 0.8rem font-size 0.8rem
.article-meta-item { .article-meta-item {
margin-right 10px margin-right 0.6rem
color var(--third-text-color) color var(--third-text-color)
&:last-child { &:last-child {

View File

@ -108,7 +108,7 @@ $logo-image-box-width = 46px
.menu-item { .menu-item {
position relative position relative
float left float left
margin-left 30px margin-left 2rem
color var(--default-text-color) color var(--default-text-color)
font-size 1rem font-size 1rem
cursor pointer cursor pointer

View File

@ -19,7 +19,7 @@
visibility visible visibility visible
img { img {
padding 2px padding 0.2rem
background var(--background-color) background var(--background-color)
transform scale(1) transform scale(1)
cursor zoom-out cursor zoom-out

View File

@ -85,9 +85,7 @@ $search-header-height = 3rem
font-size $icon-size font-size $icon-size
cursor pointer cursor pointer
&:hover .fas &:hover {
far
fab {
color var(--first-text-color) color var(--first-text-color)
} }
} }

View File

@ -5,7 +5,7 @@ $friend-link-item-border-radius = 6px
.page-template-container { .page-template-container {
keep-container(false, 0, 0, 30px, 30px) keep-container(false, 0, 0, 2rem, 2rem)
.page-template-content { .page-template-content {
color var(--default-text-color) color var(--default-text-color)

View File

@ -1,5 +1,5 @@
.paginator { .paginator {
margin-top 30px margin-top 2rem
font-size 1rem font-size 1rem
a.prev { a.prev {

View File

@ -1,5 +1,5 @@
$li-border-radius = 5px $li-border-radius = 0.4rem
$li-margin-bottom = 12px $li-margin-bottom = 0.8rem
.post-tools-container { .post-tools-container {

View File

@ -1,6 +1,6 @@
$tools-item-width = 32px $tools-item-width = 2.2rem
$tools-item-font-size = 1.1rem $tools-item-font-size = 1.1rem
$tools-item-border-radius = 1px $tools-item-border-radius = 0.1rem
.side-tools-container { .side-tools-container {
@ -9,13 +9,13 @@ $tools-item-border-radius = 1px
.tools-item { .tools-item {
width $tools-item-width width $tools-item-width
height $tools-item-width height $tools-item-width
margin-bottom 3px margin-bottom 0.2rem
color var(--default-text-color) color var(--default-text-color)
font-size $tools-item-font-size font-size $tools-item-font-size
background var(--background-color) background var(--background-color)
border-right none border-right none
border-radius $tools-item-border-radius border-radius $tools-item-border-radius
box-shadow 1px 1px 3px var(--shadow-color) box-shadow 0.1rem 0.1rem 0.2rem var(--shadow-color)
cursor pointer cursor pointer
i { i {
@ -25,7 +25,7 @@ $tools-item-border-radius = 1px
&:hover { &:hover {
color var(--background-color) color var(--background-color)
background var(--primary-color) background var(--primary-color)
box-shadow 2px 2px 6px var(--shadow-color) box-shadow 0.2rem 0.2rem 0.4rem var(--shadow-color)
i { i {
color var(--background-color) color var(--background-color)
@ -35,7 +35,7 @@ $tools-item-border-radius = 1px
+keep-tablet() { +keep-tablet() {
width $tools-item-width * 0.9 width $tools-item-width * 0.9
height $tools-item-width * 0.9 height $tools-item-width * 0.9
margin-bottom 2px margin-bottom 0.2rem
font-size $tools-item-font-size * 0.9 font-size $tools-item-font-size * 0.9
} }
@ -49,7 +49,7 @@ $tools-item-border-radius = 1px
&:hover { &:hover {
color var(--background-color) color var(--background-color)
background var(--primary-color) background var(--primary-color)
box-shadow 2px 2px 6px var(--shadow-color) box-shadow 0.2rem 0.2rem 0.4rem var(--shadow-color)
} }
} }
} }

View File

@ -1,6 +1,6 @@
.tagcloud-container { .tagcloud-container {
keep-container(false, 0, 0, 20px, 0) keep-container(false, 0, 0, 1.5rem, 0)
.tagcloud-content { .tagcloud-content {
@ -9,7 +9,7 @@
a { a {
display inline-block display inline-block
box-sizing border-box box-sizing border-box
padding 10px 8px padding 0.7rem 0.5rem
} }
} }
} }

View File

@ -1,5 +1,5 @@
.archive-container { .archive-container {
keep-container(false, 0, 0, 30px, 30px) keep-container(false, 0, 0, 2rem, 2rem)
} }

View File

@ -5,7 +5,7 @@ $article-title-font-size = 1.6rem
.article-content-container { .article-content-container {
keep-container(false, 0, 0, 30px, 30px) keep-container(false, 0, 0, 2rem, 2rem)
+keep-mobile() { +keep-mobile() {
padding 1.2rem 0.2rem padding 1.2rem 0.2rem

View File

@ -2,7 +2,7 @@ $category-name-font-size = 1.6rem
.category-container { .category-container {
keep-container(false, 0, 0, 30px, 30px) keep-container(false, 0, 0, 2rem, 2rem)
.category-name { .category-name {
margin-bottom $component-spacing-value margin-bottom $component-spacing-value

View File

@ -1,13 +1,17 @@
.category-list-container { .category-list-container {
keep-container(false, 0, 0, 30px, 0) keep-container(false, 0, 0, 2rem, 0)
.category-list-content { .category-list-content {
.all-category-list { .all-category-list {
& > .all-category-list-item > .all-category-list-link {
font-size 1.1rem
}
li.all-category-list-item { li.all-category-list-item {
margin-bottom 15px margin-bottom 1rem
font-size 1rem font-size 1rem
&:last-child { &:last-child {
@ -30,9 +34,9 @@
ul.all-category-list-child { ul.all-category-list-child {
margin-top 15px margin-top 1rem
margin-left 10px margin-left 0.9rem
li { li {
@ -40,7 +44,7 @@
content '- ' content '- '
} }
margin-bottom 10px margin-bottom 0.9rem
&:last-child { &:last-child {
margin-bottom 0 margin-bottom 0

View File

@ -2,7 +2,7 @@ $tag-name-font-size = 1.6rem
.tag-container { .tag-container {
keep-container(false, 0, 0, 30px, 30px) keep-container(false, 0, 0, 2rem, 2rem)
.tag-name { .tag-name {
margin-bottom $component-spacing-value margin-bottom $component-spacing-value