html {
overflow-x: hidden;
scroll-behavior: smooth;
::selection {
background-color: $highlight-bg-color;
color: $highlight-text-color;
}
}
//
// Reseting elements
//
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
margin: 0;
padding: 0;
}
// set `margin-bottom` to maintain vertical alignment
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
ul,
ol,
figure,
%vertical-rhythm {
margin-bottom: $font-spacing - 15;
}
//
// body
//
body {
font: $font-weight #{$font-size}/#{$line-height} $font-family;
color: $text-color;
background-color: $primary_color;
-webkit-text-size-adjust: 100%;
font-kerning: normal;
display: flex;
min-height: 100vh;
flex-direction: column;
overflow-wrap: break-word;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
&::-webkit-scrollbar {
height: 16px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background: rgba(128, 134, 139, 0.2);
background-clip: padding-box;
border: 4px solid transparent;
border-radius: 10px;
box-sizing: border-box;
&:hover {
background: rgba(128, 134, 139, 0.4);
box-sizing: border-box;
background-clip: padding-box;
}
}
}
//
// line
//
hr {
margin-top: $font-spacing;
margin-bottom: $font-spacing;
border: 0;
border-top: 2px solid $text-mute-color;
border-radius: 7px;
}
//
// wrapper
//
.wrapper {
padding: 0 $font-spacing - 5 0 $font-spacing - 5;
margin: 0 auto 0 auto;
max-width: $content-width + 100;
}
.footer-wrapper {
padding: 0 $font-spacing - 5 0 $font-spacing - 5;
margin: 0 auto 0 auto;
max-width: 1168px;
}
.post-wrapper {
padding: 0 $font-spacing - 5 0 $font-spacing - 5;
margin: 0 auto 0 auto;
max-width: $content-width + 100;
@media screen and (min-width: 1111px) {
display: flex;
justify-content: center;
}
}
.content {
padding: 30px 0 30px;
flex: 1 0 auto;
overflow: hidden;
opacity: 0;
transform: translateY(3rem);
animation: 208.898ms linear 0s 1 normal forwards running slide-up;
animation-delay: 252.00568990042672ms;
}
//
// Headers
//
h1 {
font-size: $font-size + 31;
line-height: 1.5;
}
h2 {
font-size: $font-size + 26;
line-height: 1.5;
}
h3 {
font-size: $font-size + 21;
line-height: 1.5;
}
h4 {
font-size: $font-size + 16;
line-height: 1.5;
}
h5 {
font-size: $font-size + 11;
line-height: 1.5;
}
h6 {
font-size: $font-size + 6;
line-height: 1.5;
}
//
// Lists
//
ul,
ol {
margin-left: $font-spacing;
}
//
// Links
//
a {
text-decoration: none;
transition: $transition-links;
color: $link-visited-color;
font-weight: 700;
&:hover {
color: $link-hover-color;
text-decoration: none;
}
}
li {
> ul,
> ol {
margin-bottom: 0;
}
}
//
// Image
//
img {
max-width: 100%;
height: auto;
}
//
// BOLD
//
strong {
font-weight: 900;
font-size: 18px;
}
//
// Figures
//
figure > img {
display: block;
}
figcaption {
font-size: $small-font-size;
}
//
// Blockquotes
//
blockquote {
color: $blockquote-text-color;
border-left: 4px solid $code-background-color;
padding-left: $font-spacing / 2;
@include relative-font-size(1.125);
font-style: italic;
> :last-child {
margin-bottom: 0;
}
i,
em {
font-style: normal;
}
}
//
// Code format
//
pre,
code {
font-size: inherit;
border: 1px solid $code-background-color;
border-radius: 4px;
font-weight: 700;
background-color: $code-background-color;
color: $code-text-color;
@include horizontal-scroll();
}
code {
padding: 1px 5px;
a {
color: inherit !important;
border-bottom: none !important;
pointer-events: none;
}
}
pre {
overflow-x: auto;
> code {
border: 0;
padding-right: 0;
padding-left: 0;
}
}
.rouge-table {
width: 0%;
.rouge-gutter {
padding: 0px;
border: 0px;
}
td.rouge-code {
padding-left: 1rem;
border: 0px;
}
border: 0px;
margin-bottom: 0px;
}
.highlight {
border-radius: 5px;
background: $code-background-color;
border: 0px;
@extend %vertical-rhythm;
pre {
margin-bottom: 0;
font-size: $code-font-family;
line-height: 1.5rem;
word-wrap: normal;
/* Fixed Safari overflow-x */
}
.lineno {
padding-top: 7px;
padding-bottom: 7px;
padding-left: 7px;
padding-right: 0px;
width: 1%;
min-width: 20px;
text-align: right;
color: $text-mute-color;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
// set the dollar sign to non-selectable
.gp {
user-select: none;
}
table {
td pre {
overflow: visible; // Fixed iOS safari overflow-x
word-break: normal; // Fixed iOS safari linenos code break
}
}
.highlighter-rouge & {
background: $code-background-color;
}
}
// Removes the line numbers default snippets
div {
&[class^="highlighter-rouge"],
&.language-plaintext.highlighter-rouge,
&.language-console.highlighter-rouge,
&.language-terminal.highlighter-rouge,
&.nolineno {
pre.lineno {
display: none;
}
td.rouge-code {
padding: 8px 12px;
}
pre.highlight {
padding: 0px;
padding-bottom: 0px;
}
}
}
//
// Icons
//
// .stackoverflow {
// color: #f66a0a;
// }
// .youtube {
// color: #dd0505;
// }
// .github {
// color: $Github;
// }
.svg-icon {
width: 16px;
height: 16px;
display: inline-block;
fill: currentColor;
padding: 5px 3px 2px 5px;
vertical-align: text-bottom;
}
.gitlab {
color: $Github;
}
dl {
padding: 0;
dt {
padding: 0;
margin-top: 1rem;
font-size: $font-size;
font-weight: 690;
}
dd {
margin-inline-start: 40px;
}
}
//
// Error page
//
.container {
margin: 10px auto;
max-width: 400px;
text-align: center;
background-color: $error-div-bg-color;
border-radius: 20px;
align-content: center;
> svg {
height: 220px;
width: 220px;
margin-left: 3px;
margin-right: 5px;
margin-top: 50px;
fill: $error-btn-svg-color;
}
}
.error-pagh {
> p {
margin-bottom: 0px;
line-height: 2;
&:last-child {
margin-bottom: 15px;
}
}
}
.btn-error {
display: inline-block;
padding: 17px 16px 16px;
color: #e7e7e7;
background-color: #2e353e;
transition: all 0.2s ease-in-out;
width: 92%;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
height: 24px;
line-height: 1.5;
&,
&:visited {
color: $text-color;
}
&:hover {
color: $btn-text-hover-color;
text-decoration: none;
background-color: $btn-color-hover;
border-color: $btn-color-hover;
}
}