Improve the SCSS code style

This commit is contained in:
Cotes Chung 2020-10-27 22:08:04 +08:00
parent 7d128769f6
commit 62aef9f850
8 changed files with 112 additions and 112 deletions

View file

@ -87,7 +87,7 @@ $sidebar-display: "sidebar-display";
a {
font-weight: 900;
font-size: 1.5rem;
letter-spacing: .5px;
letter-spacing: 0.5px;
&:hover {
color: #fff;
text-decoration: none;
@ -101,17 +101,17 @@ $sidebar-display: "sidebar-display";
color: #828282;
line-height: 1.2rem;
word-spacing: 1px;
margin: .5rem 1.5rem 2rem 1.5rem;
margin: 0.5rem 1.5rem 2rem 1.5rem;
}
.sidebar-bottom {
.icon-border + a { // the icon behide mode-toggle
margin-left: .1rem;
margin-left: 0.1rem;
}
}
.nav-link {
border-radius: 0;
font-size: .95rem;
font-size: 0.95rem;
font-weight: 600;
letter-spacing: 1px;
}
@ -181,7 +181,7 @@ $sidebar-display: "sidebar-display";
font-size: 1.2rem;
margin: 2rem 2.5rem 1.6rem;
a {
margin-bottom: .5rem; // icons may have multi lines
margin-bottom: 0.5rem; // icons may have multi lines
}
a:hover, #mode-toggle-wrapper > i:hover {
@ -204,7 +204,7 @@ $sidebar-display: "sidebar-display";
width: 3px;
height: 3px;
border-radius: 50%;
margin-top: .75rem;
margin-top: 0.75rem;
}
}
} // #sidebar
@ -295,7 +295,7 @@ $sidebar-display: "sidebar-display";
#breadcrumb {
font-size: 1rem;
color: gray;
padding-left: .5rem;
padding-left: 0.5rem;
a:hover {
@extend %link-hover;
}
@ -323,7 +323,7 @@ $sidebar-display: "sidebar-display";
padding: 0 .5rem;
i {
z-index: 2;
font-size: .9rem;
font-size: 0.9rem;
color: var(--search-icon-color);
}
.fa-times-circle { /* button 'clean up' */
@ -341,7 +341,7 @@ $sidebar-display: "sidebar-display";
background: center;
border: 0;
border-radius: 0;
padding: .18rem .3rem;
padding: 0.18rem .3rem;
color: var(--text-color);
}
@ -366,12 +366,12 @@ $sidebar-display: "sidebar-display";
font-size: 1rem;
background: var(--search-tag-bg);
border: none;
padding: .5rem;
padding: 0.5rem;
margin: 0 1rem 1rem 0;
&::before {
content: "#";
color: var(--text-muted-color);
padding-right: .2rem;
padding-right: 0.2rem;
}
}
}
@ -395,7 +395,7 @@ $sidebar-display: "sidebar-display";
}
i { // icons
color: #818182;
margin-right: .15rem;
margin-right: 0.15rem;
font-size: 80%;
}
> p {
@ -527,7 +527,7 @@ footer {
@include panel-label;
}
.post-content {
font-size: .9rem;
font-size: 0.9rem;
}
}
@ -542,8 +542,8 @@ footer {
font-size: 0.85rem;
background: none;
border: 1px solid var(--btn-border-color);
border-radius: .8rem;
padding: .3rem .5rem;
border-radius: 0.8rem;
padding: 0.3rem .5rem;
margin: 0 .35rem .5rem 0;
&:hover {
background-color: #2a408e;
@ -659,12 +659,12 @@ sup {
}
.footnotes ol {
margin-top: .5rem;
margin-top: 0.5rem;
> li {
padding-top: .2rem;
padding-top: 0.2rem;
margin-top: -0.2rem;
> p {
padding-left: .2em;
padding-left: 0.2em;
}
&:not(:last-child) {
margin-bottom: -.8rem;
@ -694,11 +694,11 @@ sup {
.reversefootnote {
@at-root a#{&} {
font-size: .6rem;
font-size: 0.6rem;
position: absolute;
line-height: 1;
padding-top: .5em;
margin-left: .5em;
padding-top: 0.5em;
margin-left: 0.5em;
border-bottom-style: none !important;
}
}
@ -737,7 +737,7 @@ img {
margin-bottom: 1rem;
}
em { /* MarkDown italic */
padding-right: .2rem;
padding-right: 0.2rem;
}
a:hover {
code {
@ -813,7 +813,7 @@ div.post-content .table-wrapper {
@mixin img($caption: false) {
> img:not([style]) {
margin: .5rem 0;
margin: 0.5rem 0;
&:not(.normal):not(.left):not(.right) {
@include align-center;
@ -825,12 +825,12 @@ div.post-content .table-wrapper {
&.left {
float: left;
margin: .75rem 1rem 1rem 0;
margin: 0.75rem 1rem 1rem 0;
}
&.right {
float: right;
margin: .75rem 0 1rem 1rem;
margin: 0.75rem 0 1rem 1rem;
}
}
@ -876,12 +876,12 @@ div.post-content .table-wrapper {
min-width: 2rem;
text-align: center;
background: var(--tag-bg);
border-radius: .3rem;
border-radius: 0.3rem;
padding: 0 .4rem;
color: inherit;
line-height: 1.3rem;
&:not(:last-child) {
margin-right: .2rem;
margin-right: 0.2rem;
}
&:hover {
@ -942,7 +942,7 @@ div.post-content .table-wrapper {
}
.tooltip-inner { /* Overrided BS4 Tooltip */
font-size: .7rem;
font-size: 0.7rem;
max-width: 220px;
text-align: left;
}
@ -1008,7 +1008,7 @@ div.post-content .table-wrapper {
> div.d-flex {
width: 100%;
padding: 1.5rem 0;
margin-bottom: .3rem;
margin-bottom: 0.3rem;
flex-wrap: wrap;
justify-content: left!important;
-ms-flex-pack: distribute!important;
@ -1368,7 +1368,7 @@ div.post-content .table-wrapper {
#main > div.row > div.col-xl-8 {
padding-left: 0;
> div:first-child {
padding-left: .55rem !important;
padding-left: 0.55rem !important;
padding-right: 1.9rem !important;
}
}
@ -1408,7 +1408,7 @@ div.post-content .table-wrapper {
}
.profile-text {
margin-left: .5rem;
margin-left: 0.5rem;
/* .d-flex */
display: -webkit-box!important;
display: -ms-flexbox!important;
@ -1437,7 +1437,7 @@ div.post-content .table-wrapper {
.site-subtitle {
word-spacing: 0;
margin: .3rem 0 0 0;
margin: 0.3rem 0 0 0;
}
ul {
@ -1457,8 +1457,8 @@ div.post-content .table-wrapper {
> i {
@include icon-round(1.65rem);
line-height: 1rem;
font-size: .6rem;
padding: .5em 0 0 .1em;
font-size: 0.6rem;
padding: 0.5em 0 0 .1em;
display: inline-block!important;
}
}
@ -1477,22 +1477,22 @@ div.post-content .table-wrapper {
i {
text-align: center;
width: 1.25em;
padding-top: .44rem;
padding-top: 0.44rem;
}
}
#mode-toggle-wrapper {
font-size: .9rem;
font-size: 0.9rem;
i {
@include icon-round(2rem);
padding-top: .44rem;
padding-top: 0.44rem;
bottom: 0;
}
}
.icon-border {
@include ml-mr(.2rem);
margin-top: .85rem;
margin-top: 0.85rem;
+a {
margin-left: 0;
}

View file

@ -100,14 +100,14 @@
}
@mixin panel-label {
@include label(inherit);
display: block;
line-height: 1.2;
padding-top: .5rem;
padding-bottom: .5rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
margin-top: 0;
margin-bottom: 0;
letter-spacing: -0.02em;
@include label(inherit);
}
@mixin align-center {

View file

@ -116,7 +116,7 @@
/* post title in Archvies */
margin-left: 2.5rem;
position: relative;
top: .1rem;
top: 0.1rem;
}
&::after {
@extend %date-timeline;

View file

@ -52,7 +52,7 @@
color: #6c757d!important;
> i.fas {
position: relative;
height: .7rem;
height: 0.7rem;
width: 1rem;
transition: 300ms ease all;
}

View file

@ -12,7 +12,7 @@
#page-category, #page-tag {
ul > li {
line-height: 1.5rem;
padding: .6rem 0;
padding: 0.6rem 0;
&::before { // dot
background: #999;
width: 5px;
@ -21,8 +21,8 @@
display: block;
content: "";
position: relative;
top: .6rem;
margin-right: .5rem;
top: 0.6rem;
margin-right: 0.5rem;
}
> a { /* post's title */
font-size: 1.1rem;

View file

@ -10,7 +10,7 @@
#post-list {
margin-top: 1rem;
padding-right: .5rem;
padding-right: 0.5rem;
.post-preview {
padding-top: 1.5rem;
@ -21,13 +21,13 @@
font-size: 1.4rem;
margin: 0;
~i { // pinned icon
font-size: .86rem;
font-size: 0.86rem;
}
}
.post-meta {
i {
font-size: .73rem;
font-size: 0.73rem;
&:not(:first-child) { // post-meta icons on the homepage
margin-left: 1.5rem;
}
@ -35,8 +35,8 @@
}
.post-content {
margin-top: .6rem;
margin-bottom: .6rem;
margin-top: 0.6rem;
margin-bottom: 0.6rem;
color: var(--post-list-text-color);
>p {
/* Make preview shorter on the homepage */
@ -128,7 +128,7 @@
}
.pagination {
font-size: .85rem;
font-size: 0.85rem;
.page-item .page-link {
width: 2.2rem;
height: 2.2rem;

View file

@ -89,20 +89,20 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
p {
font-size: 1.1rem;
line-height: 1.5rem;
margin-top: .3rem;
margin-top: 0.3rem;
white-space: normal;
}
a, span {
&::before {
color: var(--text-muted-color);
font-size: .65rem;
font-size: 0.65rem;
text-transform: uppercase;
}
&:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
left: .5px;
left: 0.5px;
&::before {
content: $prompt-older
}
@ -110,7 +110,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
&:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
right: .5px;
right: 0.5px;
&::before {
content: $prompt-newer
}
@ -148,8 +148,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
#toc li>a {
line-height: 1rem;
padding-top: .5rem;
padding-bottom: .5rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
@ -181,8 +181,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
}
p {
font-size: .9rem;
margin-bottom: .5rem;
font-size: 0.9rem;
margin-bottom: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
@ -233,7 +233,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
font-size: 1.2rem;
a {
&:not(:last-child) {
margin-right: .25rem;
margin-right: 0.25rem;
}
&:hover {
text-decoration: none;
@ -243,7 +243,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
}
}
>i {
padding-top: .35rem;
padding-top: 0.35rem;
&:hover {
@extend %btn-share-hovor;
}
@ -291,7 +291,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
font-weight: 400;
}
span:last-child {
font-size: .85rem;
font-size: 0.85rem;
}
} // .license-wrapper
@ -320,8 +320,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
content: "\2022";
color: rgba(158, 158, 158, 0.8);
font-weight: bold;
padding-left: .5rem;
padding-right: .3rem;
padding-left: 0.5rem;
padding-right: 0.3rem;
}
&.flex-column {
-webkit-box-orient: horizontal!important;

View file

@ -12,7 +12,7 @@
.tag {
border-radius: 0.7em;
padding: 6px 8px 7px;
margin-right: .8rem;
margin-right: 0.8rem;
line-height: 3rem;
letter-spacing: 0;
border: 1px solid var(--tag-border) !important;