Rewrite styles with SCSS.

This commit is contained in:
Cotes Chung 2020-02-25 17:56:03 +08:00
parent f353c7a97b
commit 73d1027acc
10 changed files with 1165 additions and 1104 deletions

View File

@ -47,6 +47,19 @@
--footnote-target-bg: rgb(63, 81, 181);
--btn-sharing: #6c757d;
/* tags */
--tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33);
/* categories */
--categories-hover-bg: rgb(73, 75, 76);
/* archives */
--timeline-node-bg: rgb(150, 152, 156);
/* Footer */
---footer-link: rgb(146, 146, 146);
hr {
border-color: var(--main-border);
}
@ -68,40 +81,29 @@
background-color: var(--card-bg);
}
.categories .card-header {
background-color: var(--card-header-bg);
.categories {
.card-header {
background-color: var(--card-header-bg);
}
.list-group-item {
// @extend %category-bg;
border-left: none;
border-right: none;
padding-left: 2rem;
border-color: var(--main-border);
&:last-child {
border-bottom-color: var(--card-bg);
}
}
}
.categories .list-group-item {
border-left: none;
border-right: none;
padding-left: 2rem;
border-color: var(--main-border);
}
.categories .list-group-item:last-child {
border-bottom-color: var(--card-bg);
}
/* tags */
--tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33);
/* categories */
--categories-hover-bg: rgb(73, 75, 76);
/* archives */
--timeline-node-bg: rgb(150, 152, 156);
#archives li:nth-child(odd) {
background-image: linear-gradient(to left,
rgb(26, 26, 30), rgb(39, 39, 45), rgb(39, 39, 45), rgb(39, 39, 45), rgb(26, 26, 30));
}
/* Footer */
---footer-link: rgb(146, 146, 146);
}
} // dark-scheme
@mixin light-mode-invisible {

84
assets/css/_module.scss Normal file
View File

@ -0,0 +1,84 @@
/*
* Mainly scss modules, only imported to `assets/css/main.scss`
*
* v2.1
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2020 Cotes Chung
* MIT Licensed
*/
/*---------- scss placeholder ---------*/
%tag-hover {
background: var(--tag-hover, rgb(222, 226, 230));
transition: background 0.35s ease-in-out;
}
%table-cell {
padding: .35rem .8rem;
font-size: 95%;
}
%link-hover {
color: #d2603a!important;
border-bottom: 1px solid #d2603a;
text-decoration: none;
}
%link-color {
color: var(--link-color, #2a408e);
}
%no-bottom-border {
border-bottom: none;
}
%section {
line-height: 1.2;
margin-bottom: 1rem;
}
%anchor {
padding-top: 3.5rem;
margin-top: -2.5rem;
}
%footer-content {
font-weight: 600;
color: var(---footer-link, inherit);
}
/*---------- scss mixin ---------*/
@mixin no-text-decoration {
text-decoration: none;
}
@mixin sidebar-icon {
color: rgba(255, 255, 255, 0.5);
transition: color 0.35s ease-in-out;
user-select: none;
margin: 0 .25rem;
}
@mixin icon-round($diameter) {
border: 1px solid;
border-radius: 50%;
width: $diameter;
height: $diameter;
}
@mixin ml-mr($value) {
margin-left: $value;
margin-right: $value;
}
@mixin pl-pr($val) {
padding-left: $val;
padding-right: $val;
}
@mixin input-placeholder {
opacity: 0.6;
}

View File

@ -8,109 +8,9 @@
MIT License
*/
#archives {
letter-spacing: 0.03rem;
}
$dot-color: #c2c6cc;
#archives li {
font-size: 1.1rem;
line-height: 3rem;
}
#archives li:nth-child(odd) {
background-color: var(--main-wrapper-bg, #fff);
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
}
#archives li>div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#archives span.lead {
font-size: 1.5rem;
font-family: 'Oswald', sans-serif;
position: relative;
left: 8px;
}
#archives span.lead:not(:first-child) {
position: relative;
left: 4px;
}
#archives span.lead:not(:first-child)::after {
left: 67px;
}
#archives span.lead::after { /* Year dot */
content: "";
display: block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 12px;
height: 12px;
top: -26px;
left: 63px;
border: 3px solid;
background-color: var(--main-border, #ffffff);
border-color: var(--timeline-node-bg, #c2c6cc);
box-shadow: 0 0 2px 0 #c2c6cc;
z-index: 1;
}
#archives .date {
white-space: nowrap;
display: inline-block;
}
#archives .date.month {
width: 1.4rem;
text-align: center;
font-family: 'Oswald', sans-serif;
}
#archives .date.day {
font-size: 85%;
font-family: sans-serif;
text-align: center;
margin-right: -2px;
width: 1.2rem;
position: relative;
left: -.15rem;
}
#archives ul>li>div>a {
/* post title in Archvies */
margin-left: 2.5rem;
position: relative;
top: .1rem;
}
#archives .date.month ~ a::before {
/* A dot for Month and Day */
content: "";
display: inline-block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 8px;
height: 8px;
float: left;
top: 1.35rem;
left: 69px;
background-color: var(--timeline-node-bg, #c2c6cc);
box-shadow: 0 0 3px 0 #c2c6cc;
z-index: 1;
}
/* timeline for date */
#archives ul>li::after,
#archives ul>li:first-child::before {
%date-timeline {
content: "";
width: 4px;
left: 75px;
@ -120,30 +20,127 @@
background-color: var(--main-border, rgba(0, 0, 0, 0.075));
}
#archives ul>li::after {
height: 2.8rem;
top: -1.3rem;
}
#archives {
letter-spacing: 0.03rem;
li {
font-size: 1.1rem;
line-height: 3rem;
&:nth-child(odd) {
background-color: var(--main-wrapper-bg, #fff);
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
}
>div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
#archives ul>li:first-child::before {
height: 3.06rem;
top: -1.61rem;
}
span.lead {
font-size: 1.5rem;
font-family: 'Oswald', sans-serif;
position: relative;
left: 8px;
#archives ul:not(:last-child)>li:last-child::after {
height: 3.4rem;
}
&:not(:first-child) {
position: relative;
left: 4px;
&::after {
left: 67px;
}
}
&::after {
/* Year dot */
content: "";
display: block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 12px;
height: 12px;
top: -26px;
left: 63px;
border: 3px solid;
background-color: var(--main-border, #ffffff);
border-color: var(--timeline-node-bg, $dot-color);
box-shadow: 0 0 2px 0 $dot-color;
z-index: 1;
}
} // #archives span.lead
.date {
white-space: nowrap;
display: inline-block;
&.month {
width: 1.4rem;
text-align: center;
font-family: 'Oswald', sans-serif;
~a::before {
/* A dot for Month and Day */
content: "";
display: inline-block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 8px;
height: 8px;
float: left;
top: 1.35rem;
left: 69px;
background-color: var(--timeline-node-bg, $dot-color);
box-shadow: 0 0 3px 0 $dot-color;
z-index: 1;
}
}
&.day {
font-size: 85%;
font-family: sans-serif;
text-align: center;
margin-right: -2px;
width: 1.2rem;
position: relative;
left: -.15rem;
}
} // #archives .date
ul {
>li {
>div>a {
/* post title in Archvies */
margin-left: 2.5rem;
position: relative;
top: .1rem;
}
&::after {
@extend %date-timeline;
height: 2.8rem;
top: -1.3rem;
}
&:first-child::before {
@extend %date-timeline;
height: 3.06rem;
top: -1.61rem;
}
}
&:not(:last-child)>li:last-child::after {
height: 3.4rem;
}
&:last-child>li:last-child::after {
display: none;
}
} // #archives ul
} // #archives
#archives ul:last-child>li:last-child::after {
display: none;
}
@media all and (max-width: 576px) {
#archives {
margin-top: -1rem;
}
#archives ul {
letter-spacing: 0;
ul {
letter-spacing: 0;
}
}
}

View File

@ -8,35 +8,43 @@
MIT License
*/
.categories {
margin-bottom: 2rem;
}
.categories .card-header {
padding-right: 12px;
}
.categories .card-header>span>i:first-child,
.categories .list-group-item>i {
%category-icon-color {
color: gray;
}
.categories .list-group-item {
border-left: none;
border-right: none;
padding-left: 2rem;
}
.categories {
margin-bottom: 2rem;
.card-header {
padding-right: 12px;
}
.list-group-item {
border-left: none;
border-right: none;
padding-left: 2rem;
}
.categories .collapsing .list-group-item:first-child,
.categories .collapse .list-group-item:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.card-header>span>i:first-child {
@extend %category-icon-color;
}
.categories i.far,
.categories i.fas { // fontawesome icons
font-size: 86%;
}
.list-group-item {
>i {
@extend %category-icon-color;
}
.collapsing &:first-child,
.collapse &:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
i {
&.far, &.fas {
font-size: 86%; // fontawesome icons
}
}
} // .categories
.category-trigger {
width: 1.7rem;
@ -44,6 +52,12 @@
border-radius: 50%;
text-align: center;
color: #6c757d!important;
>i.fas {
position: relative;
height: .7rem;
width: 1rem;
transition: 300ms ease all;
}
}
@media (hover: hover) { // only works on desktop
@ -52,15 +66,8 @@
}
}
.category-trigger>i.fas {
position: relative;
height: .7rem;
width: 1rem;
transition: 300ms ease all;
}
.rotate {
-ms-transform: rotate(-90deg); /* IE 9 */
-webkit-transform: rotate(-90deg); /* Safari 3-8 */
transform: rotate(-90deg);
}
}

View File

@ -8,33 +8,29 @@
MIT License
*/
#page-category ul>li,
#page-tag ul>li {
line-height: 1.5rem;
padding: .6rem 0;
}
#page-category ul>li::before,
#page-tag ul>li::before {
background: #999;
width: 5px;
height: 5px;
border-radius: 50%;
display: block;
content: "";
position: relative;
top: .6rem;
margin-right: .5rem;
}
#page-tag ul>li>a,
#page-category ul>li>a, { /* post's title */
font-size: 1.1rem;
}
#page-category ul>li>span:last-child,
#page-tag ul>li>span:last-child { /* post's date */
white-space: nowrap;
#page-category, #page-tag {
ul>li {
line-height: 1.5rem;
padding: .6rem 0;
&::before { // dot
background: #999;
width: 5px;
height: 5px;
border-radius: 50%;
display: block;
content: "";
position: relative;
top: .6rem;
margin-right: .5rem;
}
>a { /* post's title */
font-size: 1.1rem;
}
>span:last-child {
white-space: nowrap;
}
/* post's date */
}
}
#page-tag h1>i { // tag icon
@ -45,10 +41,12 @@
font-size: 1.25rem;
}
#page-category a:hover,
#page-tag a:hover,
#access-lastmod a:hover {
margin-bottom: -1px; // Avoid jumping
a:hover {
#page-category &,
#page-tag &,
#access-lastmod & {
margin-bottom: -1px; // Avoid jumping
}
}
.dash {
@ -57,17 +55,16 @@
}
@media all and (max-width: 576px) {
#page-category ul>li::before,
#page-tag ul>li::before {
margin: 0 .5rem;
#page-category, #page-tag {
ul>li {
&::before {
margin: 0 .5rem;
}
>a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
#page-tag ul>li>a,
#page-category ul>li>a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}

View File

@ -1,6 +1,5 @@
---
---
/*!
Style for Homepage
v2.0
@ -12,95 +11,90 @@
#post-list {
margin-top: 1rem;
padding-right: .5rem;
.post-meta {
i:not(:first-child) { // post-meta icons on HOME
margin-left: 1.5rem;
}
}
}
.pagination {
font-size: 1rem;
}
.pagination a:hover {
text-decoration: none;
a:hover {
text-decoration: none;
}
}
.post-preview {
padding-top: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid rgba(158, 158, 158, 0.17);
>h1 {
font-size: 1.4rem;
margin: 0;
}
i.far { /* fontawesome icons */
font-size: 86%;
}
.post-content {
margin-top: .6rem;
margin-bottom: .6rem;
color: var(--text-color, dimgray);
>p { /* Make preview shorter in Home page*/
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
}
.post-preview>h1 {
font-size: 1.4rem;
margin: 0;
}
.page-item {
.page-link {
color: var(--text-color, #555555);
width: 2.5rem;
height: 2.5rem;
padding: 0;
text-align: center;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
border-radius: 50%;
border: 1px solid var(--main-border, #f1f1f1);
font-family: 'Lato', sans-serif;
background-color: var(--button-bg);
}
&.active {
.page-link {
background-color: var(--btn-active-bg, #2a408e);
border-color: var(--btn-active-border-color, #007bff);
box-shadow: 0 0 8px 0 var(--main-wrapper-bg, #4b92d2) !important;
color: var(--text-color, #f8f8f8);
}
}
&.disabled {
cursor: not-allowed;
.page-link {
color: rgba(108, 117, 125, 0.57);
border-color: var(--main-border, #f1f1f1);
background-color: var(--button-bg);
}
}
&:first-child .page-link,
&:last-child .page-link {
border-radius: 50%;
}
&:not(:last-child) {
margin-right: 0.6rem;
}
.post-preview i.far {
/* fontawesome icons */
font-size: 86%;
}
} // .page-item
.post-preview .post-content {
margin-top: .6rem;
margin-bottom: .6rem;
color: var(--text-color, dimgray);
}
/* Make preview shorter in Home page*/
.post-preview .post-content>p {
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.page-item .page-link {
color: var(--text-color, #555555);
width: 2.5rem;
height: 2.5rem;
padding: 0;
text-align: center;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
border-radius: 50%;
border: 1px solid var(--main-border, #f1f1f1);
font-family: 'Lato', sans-serif;
background-color: var(--button-bg);
}
.page-item.active .page-link {
background-color: var(--btn-active-bg, #2a408e);
border-color: var(--btn-active-border-color, #007bff);
box-shadow: 0 0 8px 0 var(--main-wrapper-bg, #4b92d2) !important;
color: var(--text-color, #f8f8f8);
}
.page-item.disabled .page-link {
color: rgba(108, 117, 125, 0.57);
border-color: var(--main-border, #f1f1f1);
background-color: var(--button-bg);
}
.page-item.disabled {
cursor: not-allowed;
}
.page-item:first-child .page-link,
.page-item:last-child .page-link {
border-radius: 50%;
}
.page-item:not(:last-child) {
margin-right: 0.6rem;
}
#post-list .post-meta i:not(:first-child) { // post-meta icons on HOME
margin-left: 1.5rem;
}
@media all and (max-width: 576px) {
#post-list .post-meta>span i:not(:first-child) {

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,20 @@
$prompt-older: "{{ site.data.label.post.button.previous }}";
$prompt-newer: "{{ site.data.label.post.button.next }}";
@mixin btn-sharing-color($light-color, $important: false) {
@if $important {
color: var(--btn-sharing, $light-color)!important;
} @else {
color: var(--btn-sharing, $light-color);
}
}
@mixin btn-post-nav {
width: 50%;
position: relative;
border-color: var(--main-border, #e9ecef);
}
.post img {
margin-top: .5rem;
margin-bottom: 1.5rem;
@ -34,37 +48,27 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
padding-top: 3rem;
padding-bottom: 2rem;
@mixin post-nav-btn {
width: 50%;
position: relative;
border-color: var(--main-border, #e9ecef);
}
.btn {
@include post-nav-btn;
@include btn-post-nav;
color: var(--link-color, #2a408e);
}
.btn:hover {
background: #2a408e;
color: #fff;
border-color: #2a408e;
}
.btn.disabled {
@include post-nav-btn;
pointer-events: auto;
cursor: not-allowed;
background: none;
color: gray;
}
.btn.disabled:hover {
border-color: none;
}
.btn.btn-outline-primary.disabled:focus {
box-shadow: none;
&:hover {
background: #2a408e;
color: #fff;
border-color: #2a408e;
}
&.disabled {
@include btn-post-nav;
pointer-events: auto;
cursor: not-allowed;
background: none;
color: gray;
&:hover {
border-color: none;
}
}
&.btn-outline-primary.disabled:focus {
box-shadow: none;
}
}
p {
@ -74,38 +78,30 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
white-space: normal;
}
a::before,
span::before {
color: var(--text-muted-color, gray);
font-size: .65rem;
text-transform: uppercase;
a, span {
&::before {
color: var(--text-muted-color, gray);
font-size: .65rem;
text-transform: uppercase;
}
&:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
left: .5px;
&::before {
content: $prompt-older
}
}
&:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
right: .5px;
&::before {
content: $prompt-newer
}
}
}
a:first-child,
span:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
left: .5px;
}
a:last-child,
span:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
right: .5px;
}
a:first-child::before,
span:first-child::before {
content: $prompt-older
}
a:last-child::before,
span:last-child::before {
content: $prompt-newer
}
}
} // .post-navigation
@keyframes fade-up {
from {
@ -127,16 +123,14 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
top: 2rem;
transition: top 0.2s ease-in-out;
animation: fade-up .8s;
}
#toc-wrapper.topbar-down {
top: 6rem;
}
#toc-wrapper>h3 {
font-size: 1rem;
font-family: 'Oswald', sans-serif;
color: gray;
&.topbar-down {
top: 6rem;
}
>h3 {
font-size: 1rem;
font-family: 'Oswald', sans-serif;
color: gray;
}
}
#toc li>a {
@ -148,13 +142,12 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
/*--- Related Posts ---*/
#related-posts > h3 {
color: gray;
font-size: 1.1rem;
font-family: 'Oswald', sans-serif;
}
#related-posts {
>h3 {
color: gray;
font-size: 1.1rem;
font-family: 'Oswald', sans-serif;
}
.card {
border: 1px solid var(--main-wrapper-bg, #f1f1f1);
background-color: var(--card-bg);
@ -165,12 +158,11 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
h3 {
color: var(--relate-post-title, #353a3d);
}
}
.card:hover {
-webkit-transform: translate3d(0, -3px, 0);
transform: translate3d(0, -3px, 0);
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
&:hover {
-webkit-transform: translate3d(0, -3px, 0);
transform: translate3d(0, -3px, 0);
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
}
}
.timeago {
@ -194,18 +186,17 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
ul {
list-style-type: none;
padding-inline-start: 1.5rem;
}
ul>li::before {
background: #c2c9d4;
width: 5px;
height: 5px;
border-radius: 1px;
display: block;
content: "";
position: relative;
top: 1rem;
right: 1rem;
>li::before {
background: #c2c9d4;
width: 5px;
height: 5px;
border-radius: 1px;
display: block;
content: "";
position: relative;
top: 1rem;
right: 1rem;
}
}
}
@ -223,32 +214,31 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
a:hover,
i:hover {
@include btn-sharing-color(#2a408e, true);
text-decoration: none;
color: var(--link-color, #2a408e)!important;
}
.share-icon {
font-size: 1.2rem;
.fab.fa-twitter {
color: var(--btn-sharing, rgba(29, 161, 242, 1.00));
}
.fab.fa-facebook-square {
color: var(--btn-sharing, rgb(66, 95, 156));
}
.fab.fa-telegram {
color: var(--btn-sharing, rgb(39, 159, 217));
}
.fab.fa-weibo {
color: var(--btn-sharing, rgb(229, 20, 43));
.fab {
&.fa-twitter {
@include btn-sharing-color(rgba(29, 161, 242, 1.00));
}
&.fa-facebook-square {
@include btn-sharing-color(rgb(66, 95, 156));
}
&.fa-telegram {
@include btn-sharing-color(rgb(39, 159, 217));
}
&.fa-weibo {
@include btn-sharing-color(rgb(229, 20, 43));
}
}
} // .share-icon
.fas.fa-link {
color: var(--btn-sharing, rgb(171, 171, 171));
@include btn-sharing-color(rgb(171, 171, 171));
}
} // .share-wrapper
@ -256,23 +246,19 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
.share-label {
font-family: 'Oswald', sans-serif;
}
.share-label::after {
content: ":";
&::after {
content: ":";
}
}
.license-wrapper {
line-height: 1.2rem;
.license-text>a {
font-weight: 600;
}
i {
font-weight: 400;
}
span:last-child {
font-size: .85rem;
}
@ -283,10 +269,9 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
.post-tail-bottom {
-ms-flex-wrap: wrap!important;
flex-wrap: wrap!important;
}
.post-tail-bottom>div:first-child {
margin-bottom: 1rem;
>div:first-child {
margin-bottom: 1rem;
}
}
}
@ -297,20 +282,23 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
}
@media all and (min-width: 768px) {
.post .post-meta > div:not(:first-child)::before {
content: "\2022";
color: rgba(158, 158, 158, 0.8);
font-weight: bold;
padding-left: .5rem;
padding-right: .3rem;
}
.post .post-meta.flex-column {
-webkit-box-orient: horizontal!important;
-webkit-box-direction: normal!important;
-ms-flex-direction: row!important;
flex-direction: row!important;
}
.post {
.post-meta {
>div:not(:first-child)::before {
content: "\2022";
color: rgba(158, 158, 158, 0.8);
font-weight: bold;
padding-left: .5rem;
padding-right: .3rem;
}
&.flex-column {
-webkit-box-orient: horizontal!important;
-webkit-box-direction: normal!important;
-ms-flex-direction: row!important;
flex-direction: row!important;
}
}
} // .post
}
@media all and (min-width: 768px) and (max-width: 830px) {

View File

@ -77,68 +77,77 @@
/*-- Codes Snippet --*/
div.highlight,
figure.highlight,
.highlighter-rouge {
%highlight-pre-bg {
background: var(--highlight-pre-bg, #f7f7f7)
}
.highlight {
overflow: auto;
%code-snippet-radius {
border-radius: 5px;
}
.highlight .lineno {
margin: .8rem 0rem;
padding: 0 .5rem;
min-width: 2.2rem;
text-align: right;
color: var(--highlight-lineno, #c2c6cc);
border-right: 1px solid var(--highlight-lineno-border, #e9ecef);
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.highlight table {
padding: 0;
border: 0;
}
.highlight td {
padding: 0;
border: 0;
}
.highlight pre {
margin-bottom: 0;
font-size: .85rem;
line-height: 1.4rem;
word-wrap: normal; /* Fixed Safari overflow-x */
}
.highlight table td pre {
overflow: visible; /* Fixed iOS safari overflow-x */
word-break: normal; /* Fixed iOS safari linenos code break */
}
/* Override BS Inline-code style */
.highlighter-rouge {
margin-bottom: 1.2em;
@extend %highlight-pre-bg;
@extend %code-snippet-radius;
margin-bottom: 1.2em; /* Override BS Inline-code style */
}
.highlight {
@extend %code-snippet-radius;
@at-root div#{&} {
@extend %highlight-pre-bg;
}
@at-root figure#{&} {
@extend %highlight-pre-bg;
}
overflow: auto;
.lineno {
margin: .8rem 0rem;
padding: 0 .5rem;
min-width: 2.2rem;
text-align: right;
color: var(--highlight-lineno, #c2c6cc);
border-right: 1px solid var(--highlight-lineno-border, #e9ecef);
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
table {
padding: 0;
border: 0;
td pre {
overflow: visible; /* Fixed iOS safari overflow-x */
word-break: normal; /* Fixed iOS safari linenos code break */
}
}
td {
padding: 0;
border: 0;
}
pre {
margin-bottom: 0;
font-size: .85rem;
line-height: 1.4rem;
word-wrap: normal;
/* Fixed Safari overflow-x */
}
} // .highlight
code {
-webkit-hyphens: none;
-ms-hyphens: none;
-moz-hyphens: none;
hyphens: none;
}
code.highlighter-rouge {
padding: 2px 4px;
margin: 0 .3rem;
border-radius: 4px;
&.highlighter-rouge {
padding: 2px 4px;
margin: 0 .3rem;
border-radius: 4px;
}
}
td.rouge-code {
@ -146,11 +155,6 @@ td.rouge-code {
padding-right: 1rem;
}
/* code snippet radius */
.highlighter-rouge,
.highlight {
border-radius: 5px;
}
/* Hide line numbers for defualt, console, and terminal code snippets */
div[class^='highlighter-rouge'] pre.lineno,
@ -171,11 +175,9 @@ div.language-terminal.highlighter-rouge td.rouge-code {
-webkit-box-shadow: inset 0 0 2px #c2c6cc;
box-shadow: inset 0 0 2px #c2c6cc;
}
.highlighter-rouge {
color: black;
}
code.highlighter-rouge {
border: 1px solid #e9ecef;
}

View File

@ -17,14 +17,9 @@
letter-spacing: 0;
border: 1px solid var(--tag-border, #dee2e6) !important;
box-shadow: 0 0 3px 0 var(--tag-shadow, #e9ecef);
}
.tag span {
margin-left: 0.6em;
font-size: 0.7em;
font-family: 'Oswald', sans-serif;
}
a.tag:hover {
text-decoration: none;
span {
margin-left: 0.6em;
font-size: 0.7em;
font-family: 'Oswald', sans-serif;
}
}