Skip to content

Commit 603e911

Browse files
committed
Improve the SCSS code style
1 parent 0d0210b commit 603e911

8 files changed

Lines changed: 112 additions & 112 deletions

File tree

assets/css/_addon/main.scss

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

assets/css/_addon/module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@
100100
}
101101

102102
@mixin panel-label {
103+
@include label(inherit);
103104
display: block;
104105
line-height: 1.2;
105-
padding-top: .5rem;
106-
padding-bottom: .5rem;
106+
padding-top: 0.5rem;
107+
padding-bottom: 0.5rem;
107108
margin-top: 0;
108109
margin-bottom: 0;
109110
letter-spacing: -0.02em;
110-
@include label(inherit);
111111
}
112112

113113
@mixin align-center {

assets/css/archives.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
background-image: linear-gradient(
3434
to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
3535
}
36-
>div {
36+
> div {
3737
white-space: nowrap;
3838
overflow: hidden;
3939
text-overflow: ellipsis;
@@ -111,12 +111,12 @@
111111
} // #archives .date
112112

113113
ul {
114-
>li {
115-
>div>a {
114+
> li {
115+
> div > a {
116116
/* post title in Archvies */
117117
margin-left: 2.5rem;
118118
position: relative;
119-
top: .1rem;
119+
top: 0.1rem;
120120
}
121121
&::after {
122122
@extend %date-timeline;
@@ -129,10 +129,10 @@
129129
top: -1.61rem;
130130
}
131131
}
132-
&:not(:last-child)>li:last-child::after {
132+
&:not(:last-child) > li:last-child::after {
133133
height: 3.4rem;
134134
}
135-
&:last-child>li:last-child::after {
135+
&:last-child > li:last-child::after {
136136
display: none;
137137
}
138138
} // #archives ul

assets/css/categories.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
border-left: none;
2323
border-right: none;
2424
padding-left: 2rem;
25-
>i {
25+
> i {
2626
@extend %category-icon-color;
2727
}
2828
&:first-child {
@@ -32,7 +32,7 @@
3232

3333
}
3434

35-
.card-header>span>i:first-child {
35+
.card-header > span > i:first-child {
3636
@extend %category-icon-color;
3737
}
3838

@@ -50,9 +50,9 @@
5050
border-radius: 50%;
5151
text-align: center;
5252
color: #6c757d!important;
53-
>i.fas {
53+
> i.fas {
5454
position: relative;
55-
height: .7rem;
55+
height: 0.7rem;
5656
width: 1rem;
5757
transition: 300ms ease all;
5858
}
@@ -68,4 +68,4 @@
6868
-ms-transform: rotate(-90deg); /* IE 9 */
6969
-webkit-transform: rotate(-90deg); /* Safari 3-8 */
7070
transform: rotate(-90deg);
71-
}
71+
}

assets/css/category-tag.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
{% include_relative _addon/main.scss %}
1111

1212
#page-category, #page-tag {
13-
ul>li {
13+
ul > li {
1414
line-height: 1.5rem;
15-
padding: .6rem 0;
15+
padding: 0.6rem 0;
1616
&::before { // dot
1717
background: #999;
1818
width: 5px;
@@ -21,25 +21,25 @@
2121
display: block;
2222
content: "";
2323
position: relative;
24-
top: .6rem;
25-
margin-right: .5rem;
24+
top: 0.6rem;
25+
margin-right: 0.5rem;
2626
}
27-
>a { /* post's title */
27+
> a { /* post's title */
2828
font-size: 1.1rem;
2929
@extend %no-bottom-border;
3030
}
31-
>span:last-child {
31+
> span:last-child {
3232
white-space: nowrap;
3333
}
3434
/* post's date */
3535
}
3636
}
3737

38-
#page-tag h1>i { // tag icon
38+
#page-tag h1 > i { // tag icon
3939
font-size: 1.2rem;
4040
}
4141

42-
#page-category h1>i {
42+
#page-category h1 > i {
4343
font-size: 1.25rem;
4444
}
4545

@@ -59,15 +59,15 @@ a:hover {
5959

6060
@media all and (max-width: 576px) {
6161
#page-category, #page-tag {
62-
ul>li {
62+
ul > li {
6363
&::before {
6464
margin: 0 .5rem;
6565
}
66-
>a {
66+
> a {
6767
white-space: nowrap;
6868
overflow: hidden;
6969
text-overflow: ellipsis;
7070
}
7171
}
7272
}
73-
}
73+
}

assets/css/home.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#post-list {
1212
margin-top: 1rem;
13-
padding-right: .5rem;
13+
padding-right: 0.5rem;
1414

1515
.post-preview {
1616
padding-top: 1.5rem;
@@ -21,22 +21,22 @@
2121
font-size: 1.4rem;
2222
margin: 0;
2323
~i { // pinned icon
24-
font-size: .86rem;
24+
font-size: 0.86rem;
2525
}
2626
}
2727

2828
.post-meta {
2929
i {
30-
font-size: .73rem;
30+
font-size: 0.73rem;
3131
&:not(:first-child) { // post-meta icons on the homepage
3232
margin-left: 1.5rem;
3333
}
3434
}
3535
}
3636

3737
.post-content {
38-
margin-top: .6rem;
39-
margin-bottom: .6rem;
38+
margin-top: 0.6rem;
39+
margin-bottom: 0.6rem;
4040
color: var(--post-list-text-color);
4141
>p {
4242
/* Make preview shorter on the homepage */
@@ -128,7 +128,7 @@
128128
}
129129

130130
.pagination {
131-
font-size: .85rem;
131+
font-size: 0.85rem;
132132
.page-item .page-link {
133133
width: 2.2rem;
134134
height: 2.2rem;
@@ -142,4 +142,4 @@
142142
#post-list {
143143
padding-right: 0;
144144
}
145-
}
145+
}

assets/css/post.scss

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,28 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
8989
p {
9090
font-size: 1.1rem;
9191
line-height: 1.5rem;
92-
margin-top: .3rem;
92+
margin-top: 0.3rem;
9393
white-space: normal;
9494
}
9595

9696
a, span {
9797
&::before {
9898
color: var(--text-muted-color);
99-
font-size: .65rem;
99+
font-size: 0.65rem;
100100
text-transform: uppercase;
101101
}
102102
&:first-child {
103103
border-top-right-radius: 0;
104104
border-bottom-right-radius: 0;
105-
left: .5px;
105+
left: 0.5px;
106106
&::before {
107107
content: $prompt-older
108108
}
109109
}
110110
&:last-child {
111111
border-top-left-radius: 0;
112112
border-bottom-left-radius: 0;
113-
right: .5px;
113+
right: 0.5px;
114114
&::before {
115115
content: $prompt-newer
116116
}
@@ -148,8 +148,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
148148

149149
#toc li>a {
150150
line-height: 1rem;
151-
padding-top: .5rem;
152-
padding-bottom: .5rem;
151+
padding-top: 0.5rem;
152+
padding-bottom: 0.5rem;
153153
}
154154

155155

@@ -181,8 +181,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
181181
}
182182

183183
p {
184-
font-size: .9rem;
185-
margin-bottom: .5rem;
184+
font-size: 0.9rem;
185+
margin-bottom: 0.5rem;
186186
overflow: hidden;
187187
text-overflow: ellipsis;
188188
display: -webkit-box;
@@ -233,7 +233,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
233233
font-size: 1.2rem;
234234
a {
235235
&:not(:last-child) {
236-
margin-right: .25rem;
236+
margin-right: 0.25rem;
237237
}
238238
&:hover {
239239
text-decoration: none;
@@ -243,7 +243,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
243243
}
244244
}
245245
>i {
246-
padding-top: .35rem;
246+
padding-top: 0.35rem;
247247
&:hover {
248248
@extend %btn-share-hovor;
249249
}
@@ -291,7 +291,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
291291
font-weight: 400;
292292
}
293293
span:last-child {
294-
font-size: .85rem;
294+
font-size: 0.85rem;
295295
}
296296
} // .license-wrapper
297297

@@ -320,8 +320,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
320320
content: "\2022";
321321
color: rgba(158, 158, 158, 0.8);
322322
font-weight: bold;
323-
padding-left: .5rem;
324-
padding-right: .3rem;
323+
padding-left: 0.5rem;
324+
padding-right: 0.3rem;
325325
}
326326
&.flex-column {
327327
-webkit-box-orient: horizontal!important;

assets/css/tags.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.tag {
1313
border-radius: 0.7em;
1414
padding: 6px 8px 7px;
15-
margin-right: .8rem;
15+
margin-right: 0.8rem;
1616
line-height: 3rem;
1717
letter-spacing: 0;
1818
border: 1px solid var(--tag-border) !important;
@@ -22,4 +22,4 @@
2222
font-size: 0.7em;
2323
font-family: 'Oswald', sans-serif;
2424
}
25-
}
25+
}

0 commit comments

Comments
 (0)