Skip to content

Commit 4aa4185

Browse files
committed
Improve SASS code style.
1 parent fdc1ca6 commit 4aa4185

File tree

9 files changed

+213
-259
lines changed

9 files changed

+213
-259
lines changed

assets/css/_addon/fonts.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
*
66
*/
77

8-
@import url('https://fonts.googleapis.com/css?family=Lato|Roboto+Condensed:400,700|Source+Sans+Pro:400,600,700,900&display=swap');
8+
@import url('https://fonts.googleapis.com/css?family=Lato|Roboto+Condensed:400,700|Source+Sans+Pro:400,600,700,900&display=swap');

assets/css/_addon/main.scss

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ $sidebar-display: "sidebar-display";
106106
}
107107

108108
.sidebar-bottom {
109-
.icon-border+a { // the icon behide mode-toggle
109+
.icon-border + a { // the icon behide mode-toggle
110110
margin-left: .1rem;
111111
}
112112
}
@@ -185,7 +185,7 @@ $sidebar-display: "sidebar-display";
185185
margin-bottom: .5rem; // icons may have multi lines
186186
}
187187

188-
a:hover, #mode-toggle-wrapper>i:hover {
188+
a:hover, #mode-toggle-wrapper > i:hover {
189189
color: #fff;
190190
}
191191

@@ -211,7 +211,7 @@ $sidebar-display: "sidebar-display";
211211
} // #sidebar
212212

213213
@media (hover: hover) {
214-
#sidebar ul>li:last-child::after {
214+
#sidebar ul > li:last-child::after {
215215
-webkit-transition: top .5s ease;
216216
-moz-transition: top .5s ease;
217217
-o-transition: top .5s ease;
@@ -242,7 +242,7 @@ $sidebar-display: "sidebar-display";
242242
transition: border-color 0.35s ease-in-out;
243243
}
244244

245-
&:hover>a {
245+
&:hover > a {
246246
border-color: #fff;
247247
}
248248

@@ -448,7 +448,7 @@ $sidebar-display: "sidebar-display";
448448
@include pl-pr(0);
449449
}
450450

451-
#main>div.row:first-child>div {
451+
#main > div.row:first-child > div {
452452
&:nth-child(1), &:nth-child(2) {
453453
margin-top: $topbar-height; /* same as the height of topbar */
454454
}
@@ -544,7 +544,7 @@ footer {
544544

545545

546546
#access-tags {
547-
>div.post-content>div {
547+
>div.post-content > div {
548548
max-width: 80%;
549549
}
550550
.post-tag {
@@ -676,7 +676,7 @@ sup {
676676
&:not(:last-child) {
677677
margin-bottom: -.8rem;
678678
}
679-
&:target>p {
679+
&:target > p {
680680
background-color: var(--footnote-target-bg);
681681
width: fit-content;
682682
-webkit-transition: background-color 1.5s ease-in-out;
@@ -693,7 +693,7 @@ sup {
693693
-webkit-transition: background-color 1.5s ease-in-out; /* Safari prior 6.1 */
694694
transition: background-color 1.5s ease-in-out;
695695
}
696-
@at-root sup:target>a#{&} {
696+
@at-root sup:target > a#{&} {
697697
background-color: var(--footnote-target-bg);
698698
padding: 0 2px;
699699
}
@@ -928,7 +928,7 @@ div.post-content .table-wrapper {
928928

929929
$footer-height: 6rem; // overwrite
930930

931-
#main>div.row:first-child>div:first-child {
931+
#main > div.row:first-child > div:first-child {
932932
min-height: calc(100vh - #{$topbar-height} - #{$footer-height});
933933
}
934934

@@ -941,7 +941,7 @@ div.post-content .table-wrapper {
941941
}
942942
}
943943

944-
#avatar>a {
944+
#avatar > a {
945945
width: 5rem;
946946
height: 5rem;
947947
}
@@ -951,7 +951,7 @@ div.post-content .table-wrapper {
951951
}
952952

953953
/* table text in small screens */
954-
div>table, p~table {
954+
div > table, p ~ table {
955955
width: 100%;
956956
table-layout: fixed;
957957
word-wrap: break-word;
@@ -1051,8 +1051,8 @@ div.post-content .table-wrapper {
10511051
top: 0 !important;
10521052
}
10531053

1054-
#main>div.row:first-child>div:nth-child(1),
1055-
#main>div.row:first-child>div:nth-child(2) {
1054+
#main > div.row:first-child > div:nth-child(1),
1055+
#main > div.row:first-child > div:nth-child(2) {
10561056
margin-top: 0;
10571057
}
10581058

@@ -1063,7 +1063,7 @@ div.post-content .table-wrapper {
10631063
}
10641064

10651065
#search-wrapper {
1066-
&.loaded~a {
1066+
&.loaded ~ a {
10671067
margin-right: 1rem;
10681068
}
10691069
.fa-times-circle {
@@ -1095,7 +1095,7 @@ div.post-content .table-wrapper {
10951095
padding-top: 3.4rem;
10961096
}
10971097

1098-
.footnotes ol>li {
1098+
.footnotes ol > li {
10991099
padding-top: 3.5rem;
11001100
margin-top: -4.3rem;
11011101
&:first-child {
@@ -1106,7 +1106,7 @@ div.post-content .table-wrapper {
11061106

11071107

11081108
@media all and (min-width: 577px) and (max-width: 1199px) {
1109-
footer>.d-flex>div {
1109+
footer>.d-flex > div {
11101110
width: 312px;
11111111
}
11121112
}
@@ -1147,7 +1147,7 @@ div.post-content .table-wrapper {
11471147
text-align: left;
11481148
}
11491149

1150-
footer>div.d-flex {
1150+
footer > div.d-flex {
11511151
width: 92%;
11521152
}
11531153

@@ -1184,7 +1184,7 @@ div.post-content .table-wrapper {
11841184
width: calc(100% - 210px);
11851185
}
11861186

1187-
#search-results>div {
1187+
#search-results > div {
11881188
max-width: 700px;
11891189
}
11901190

@@ -1222,7 +1222,7 @@ div.post-content .table-wrapper {
12221222
padding: 0;
12231223
}
12241224

1225-
#main>div.row {
1225+
#main > div.row {
12261226
-webkit-box-pack: center!important;
12271227
-ms-flex-pack: center!important;
12281228
justify-content: center!important;
@@ -1234,7 +1234,7 @@ div.post-content .table-wrapper {
12341234

12351235
@media all and (min-width: 1200px) {
12361236

1237-
#main>div.row>div.col-xl-8 {
1237+
#main > div.row > div.col-xl-8 {
12381238
-webkit-box-flex: 0;
12391239
-ms-flex: 0 0 75%;
12401240
flex: 0 0 75%;
@@ -1265,7 +1265,7 @@ div.post-content .table-wrapper {
12651265
width: calc(100% - 260px);
12661266
}
12671267

1268-
#search-results>div {
1268+
#search-results > div {
12691269
max-width: 46%;
12701270
&:nth-child(odd) {
12711271
margin-right: 1.5rem;
@@ -1283,15 +1283,15 @@ div.post-content .table-wrapper {
12831283
font-size: 1.03rem;
12841284
}
12851285

1286-
footer>div.d-felx {
1286+
footer > div.d-felx {
12871287
width: 85%;
12881288
}
12891289

12901290
}
12911291

12921292
@media all and (min-width: 1400px) {
12931293

1294-
#main>div.row {
1294+
#main > div.row {
12951295
padding-left: calc((100% - #{$main-content-max-width}) / 2);
12961296
>div.col-xl-8 {
12971297
max-width: 850px;
@@ -1323,7 +1323,7 @@ div.post-content .table-wrapper {
13231323
padding-left: 0;
13241324
}
13251325

1326-
#main>div.row>div.col-xl-8 {
1326+
#main > div.row > div.col-xl-8 {
13271327
padding-left: 0;
13281328
>div:first-child {
13291329
padding-left: .55rem !important;
@@ -1400,7 +1400,7 @@ div.post-content .table-wrapper {
14001400

14011401
ul {
14021402
margin-left: 3%;
1403-
>li>a {
1403+
>li > a {
14041404
padding-left: 2.5rem;
14051405
-webkit-box-pack: start!important;
14061406
-ms-flex-pack: start!important;
@@ -1457,7 +1457,7 @@ div.post-content .table-wrapper {
14571457
}
14581458
} // .sidebar-bottom
14591459
} // #sidebar
1460-
footer>div.d-flex {
1460+
footer > div.d-flex {
14611461
width: 87%;
14621462
max-width: 1140px;
14631463
}
@@ -1482,7 +1482,7 @@ div.post-content .table-wrapper {
14821482
max-width: calc(#{$main-content-max-width} + 20px)
14831483
}
14841484

1485-
#main>div.row {
1485+
#main > div.row {
14861486
padding-left: calc((100% - #{$main-content-max-width} - 2%) / 2);
14871487
}
14881488

@@ -1502,7 +1502,7 @@ div.post-content .table-wrapper {
15021502
}
15031503

15041504
@media (min-width: 1920px) {
1505-
#main>div.row {
1505+
#main > div.row {
15061506
padding-left: 190px;
15071507
}
15081508

assets/css/_addon/module.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
* MIT Licensed
88
*/
99

10-
/*---------- scss placeholder ---------*/
10+
/* ---------- scss placeholder --------- */
1111

1212
%tag-hover {
1313
background: var(--tag-hover);
1414
transition: background 0.35s ease-in-out;
1515
}
1616

1717
%table-cell {
18-
padding: .4rem 1rem;
18+
padding: 0.4rem 1rem;
1919
font-size: 95%;
2020
}
2121

2222
%link-hover {
23-
color: #d2603a!important;
23+
color: #d2603a !important;
2424
border-bottom: 1px solid #d2603a;
2525
text-decoration: none;
2626
}
@@ -54,7 +54,7 @@
5454
margin-top: -2.5rem;
5555
}
5656

57-
/*---------- scss mixin ---------*/
57+
/* ---------- scss mixin --------- */
5858

5959
@mixin no-text-decoration {
6060
text-decoration: none;
@@ -64,7 +64,7 @@
6464
color: $color;
6565
transition: color 0.35s ease-in-out;
6666
user-select: none;
67-
margin: 0 .25rem;
67+
margin: 0 0.25rem;
6868
}
6969

7070
@mixin icon-round($diameter) {

0 commit comments

Comments
 (0)