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

refactor: reduce duplicate scss

This commit is contained in:
Cotes Chung
2024-10-20 13:47:54 +08:00
parent 6f461132c0
commit c1bd9eb9ee
6 changed files with 45 additions and 38 deletions

View File

@@ -58,9 +58,8 @@
li {
font-size: 1.1rem;
line-height: 3rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@extend %text-ellipsis;
&:nth-child(odd) {
background-color: var(--main-bg, #ffffff);

View File

@@ -63,9 +63,7 @@
}
> a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@include text-ellipsis;
}
}
}

View File

@@ -74,9 +74,8 @@
> div:first-child {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@extend %text-ellipsis;
}
}
}

View File

@@ -1,6 +1,6 @@
/*
Post-specific style
*/
/**
* Post-specific styles
*/
%btn-post-nav {
width: 50%;
@@ -97,7 +97,7 @@ header {
&:hover {
i {
@extend %btn-share-hovor;
@extend %btn-share-hover;
}
}
}
@@ -258,9 +258,8 @@ header {
.toc-link {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@extend %text-ellipsis;
&:hover {
color: var(--toc-highlight);
@@ -509,10 +508,11 @@ header {
}
p {
@extend %text-ellipsis;
font-size: 0.9rem;
margin-bottom: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: break-spaces;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
@@ -534,7 +534,7 @@ header {
max-width: 100%;
}
%btn-share-hovor {
%btn-share-hover {
color: var(--btn-share-hover-color) !important;
}
@@ -566,10 +566,8 @@ header {
/* Hide SideBar and TOC */
@media all and (max-width: 849px) {
.post-navigation {
padding-left: 0;
padding-right: 0;
margin-left: -0.5rem;
margin-right: -0.5rem;
@include pl-pr(0);
@include ml-mr(-0.5rem);
}
}