1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

style: improve code style of SCSS & YAML

This commit is contained in:
Cotes Chung
2023-03-16 03:36:52 +08:00
parent 02b7bd5095
commit 3c7934abf0
12 changed files with 181 additions and 117 deletions

View File

@@ -8,7 +8,7 @@
$timeline-width: 4px;
%timeline {
content: "";
content: '';
width: $timeline-width;
position: relative;
float: left;
@@ -37,8 +37,9 @@
top: 24px;
}
&::after { /* Year dot */
content: "";
/* Year dot */
&::after {
content: '';
display: inline-block;
position: relative;
border-radius: 50%;
@@ -63,7 +64,14 @@
&:nth-child(odd) {
background-color: var(--main-bg, #ffffff);
background-image: linear-gradient(to left, #ffffff, #fbfbfb, #fbfbfb, #fbfbfb, #ffffff);
background-image: linear-gradient(
to left,
#ffffff,
#fbfbfb,
#fbfbfb,
#fbfbfb,
#ffffff
);
}
&::before {
@@ -109,7 +117,7 @@
&::before {
/* the dot before post title */
content: "";
content: '';
display: inline-block;
position: relative;
border-radius: 50%;

View File

@@ -54,7 +54,8 @@
}
}
@media (hover: hover) { /* only works on desktop */
/* only works on desktop */
@media (hover: hover) {
.category-trigger:hover {
background-color: var(--categories-hover-bg);
}

View File

@@ -13,31 +13,35 @@
line-height: 1.5rem;
padding: 0.6rem 0;
&::before { /* dot */
/* dot */
&::before {
background: #999999;
width: 5px;
height: 5px;
border-radius: 50%;
display: block;
content: "";
content: '';
position: relative;
top: 0.6rem;
margin-right: 0.5rem;
}
> a { /* post's title */
/* post's title */
> a {
@extend %no-bottom-border;
font-size: 1.1rem;
}
/* post's date */
> span:last-child {
white-space: nowrap;
} /* post's date */
}
}
}
#page-tag h1 > i { /* tag icon */
/* tag icon */
#page-tag h1 > i {
font-size: 1.2rem;
}