You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
694 lines
14 KiB
694 lines
14 KiB
/* Webkit Scrollbar Customize */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: $scrollbar-background;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: #888;
|
|
|
|
&:hover {
|
|
background: $scrollbar-color;
|
|
}
|
|
}
|
|
|
|
html {
|
|
box-sizing: border-box;
|
|
letter-spacing: 0.06em;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
*,
|
|
*:before,
|
|
*:after {
|
|
box-sizing: inherit;
|
|
overflow-wrap: anywhere;
|
|
word-break: break-word;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: "Inter UI", -apple-system, BlinkMacSystemFont, "Roboto",
|
|
"Segoe UI", Helvetica, Arial, sans-serif;
|
|
font-display: auto;
|
|
font-size: 1rem;
|
|
line-height: 1.54;
|
|
background-color: $light-background;
|
|
color: $light-color;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01",
|
|
"locl";
|
|
-webkit-overflow-scrolling: touch;
|
|
-webkit-text-size-adjust: 100%;
|
|
|
|
display: flex;
|
|
min-height: 100vh;
|
|
flex-direction: column;
|
|
|
|
@media #{$media-size-phone} {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
&.dark-theme {
|
|
background-color: $dark-background;
|
|
color: $dark-color;
|
|
}
|
|
}
|
|
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
display: flex;
|
|
align-items: center;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2.625rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.625rem;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.375rem;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.125rem;
|
|
}
|
|
|
|
@media #{$media-size-phone} {
|
|
h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.15rem;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.125rem;
|
|
}
|
|
}
|
|
|
|
a {
|
|
color: inherit;
|
|
}
|
|
|
|
img {
|
|
display: block;
|
|
width: auto;
|
|
height: auto;
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
|
|
&.left {
|
|
margin-right: auto;
|
|
}
|
|
|
|
&.center {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
&.right {
|
|
margin-left: auto;
|
|
}
|
|
|
|
&.circle {
|
|
border-radius: 50%;
|
|
max-width: 25%;
|
|
margin: auto;
|
|
}
|
|
}
|
|
|
|
figure {
|
|
display: table;
|
|
max-width: 100%;
|
|
margin: 1em 0;
|
|
|
|
img {
|
|
border-radius: 8px;
|
|
padding: 5px;
|
|
|
|
.dark-theme & {
|
|
background-color: $dark-image-border;
|
|
}
|
|
}
|
|
|
|
picture {
|
|
max-height: 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
&.left {
|
|
margin-right: auto;
|
|
}
|
|
|
|
&.left-floated {
|
|
margin-right: auto;
|
|
float: left;
|
|
|
|
img {
|
|
margin: 20px 20px 20px 0;
|
|
}
|
|
}
|
|
|
|
&.center {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
&.right {
|
|
margin-left: auto;
|
|
}
|
|
|
|
&.right-floated {
|
|
margin-left: auto;
|
|
float: right;
|
|
|
|
img {
|
|
margin: 20px 0 20px 20px;
|
|
}
|
|
}
|
|
|
|
&.rounded {
|
|
img {
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
|
|
figcaption {
|
|
font-size: 1.125rem;
|
|
line-height: 1.3;
|
|
margin-top: 0.4em;
|
|
opacity: 0.8;
|
|
vertical-align: middle;
|
|
|
|
span {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
&.left {
|
|
text-align: left;
|
|
}
|
|
|
|
&.center {
|
|
text-align: center;
|
|
}
|
|
|
|
&.right {
|
|
text-align: right;
|
|
}
|
|
|
|
.figcaption {
|
|
&__title {
|
|
font-weight: bold;
|
|
}
|
|
|
|
&__attr {
|
|
font-size: 0.7em;
|
|
|
|
svg {
|
|
margin-right: 0.3em;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.small {
|
|
max-width: 300px;
|
|
width: 90%;
|
|
margin: 5px 0;
|
|
}
|
|
|
|
&.inline {
|
|
display: inline-table;
|
|
}
|
|
|
|
&.floated-focus {
|
|
display: flex;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
max-width: unset;
|
|
height: 100vh;
|
|
padding: 3rem;
|
|
margin: 0;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
background-color: transparentize(darken($dark-background, 5%), 0.08);
|
|
z-index: 10000;
|
|
|
|
picture {
|
|
max-height: 90%;
|
|
}
|
|
|
|
figcaption {
|
|
color: $dark-color;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
&:after {
|
|
content: "Close";
|
|
margin-top: 1rem;
|
|
text-decoration: underline;
|
|
cursor: pointer;
|
|
display: block;
|
|
color: transparentize($dark-color, 0.43);
|
|
}
|
|
}
|
|
}
|
|
|
|
code {
|
|
font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;
|
|
font-display: auto;
|
|
font-feature-settings: normal;
|
|
background: $light-background-secondary;
|
|
padding: 1px 6px;
|
|
margin: 0 2px;
|
|
border-radius: 5px;
|
|
font-size: 0.95rem;
|
|
word-wrap: break-word;
|
|
|
|
.dark-theme & {
|
|
background: $dark-background-secondary;
|
|
}
|
|
}
|
|
|
|
pre {
|
|
// background: #212020;
|
|
padding: 10px 10px 10px 20px;
|
|
border-radius: 8px;
|
|
font-size: 0.95rem;
|
|
overflow: auto;
|
|
|
|
@media #{$media-size-phone} {
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
code {
|
|
background: none !important;
|
|
color: #ccc;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-size: inherit;
|
|
|
|
.dark-theme & {
|
|
color: inherit;
|
|
}
|
|
}
|
|
}
|
|
|
|
blockquote {
|
|
position: relative;
|
|
border-left: 2px solid;
|
|
margin: 20px 40px;
|
|
padding: 10px 20px;
|
|
|
|
@media #{$media-size-phone} {
|
|
margin: 10px 10px 10px 25px;
|
|
padding: 10px;
|
|
}
|
|
|
|
&:before {
|
|
content: "”";
|
|
// font-family: Georgia, serif;
|
|
font-display: auto;
|
|
font-size: 3.875rem;
|
|
position: absolute;
|
|
left: -40px;
|
|
top: -13px;
|
|
|
|
@media #{$media-size-phone} {
|
|
left: -27.5px;
|
|
top: -7px;
|
|
font-size: 3.075rem;
|
|
}
|
|
}
|
|
|
|
p:first-of-type {
|
|
margin-top: 0;
|
|
}
|
|
|
|
p:last-of-type {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
ul,
|
|
ol {
|
|
margin-left: 40px;
|
|
padding: 0;
|
|
|
|
@media #{$media-size-phone} {
|
|
margin-left: 20px;
|
|
}
|
|
}
|
|
|
|
ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.container {
|
|
flex: 1 auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1 auto;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0;
|
|
|
|
@media #{$media-size-phone} {
|
|
margin-top: 0;
|
|
}
|
|
|
|
&-list {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
hr {
|
|
width: 100%;
|
|
border: none;
|
|
background: $light-border-color;
|
|
height: 1px;
|
|
|
|
.dark-theme & {
|
|
background: $dark-border-color;
|
|
}
|
|
}
|
|
|
|
svg {
|
|
height: 1em;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.hide-on-phone {
|
|
@media #{$media-size-phone} {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.hide-on-tablet {
|
|
@media #{$media-size-tablet} {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
// Accessibility
|
|
.screen-reader-text {
|
|
border: 0;
|
|
clip: rect(1px, 1px, 1px, 1px);
|
|
clip-path: inset(50%);
|
|
height: 1px;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
position: absolute !important;
|
|
width: 1px;
|
|
word-wrap: normal !important;
|
|
}
|
|
|
|
.screen-reader-text:focus {
|
|
background-color: $screen-reader-text-background;
|
|
border-radius: 3px;
|
|
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
|
|
clip: auto !important;
|
|
clip-path: none;
|
|
color: $screen-reader-text-color;
|
|
display: block;
|
|
font-size: 14px;
|
|
font-size: 0.875rem;
|
|
font-weight: bold;
|
|
height: auto;
|
|
width: auto;
|
|
top: 5px;
|
|
left: 5px;
|
|
line-height: normal;
|
|
padding: 15px 23px 14px;
|
|
text-decoration: none;
|
|
z-index: 100000;
|
|
}
|
|
|
|
// Custom
|
|
.socials {
|
|
user-select: none;
|
|
|
|
svg {
|
|
font-size: 1.5rem;
|
|
}
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
padding: 10px 10px 10px 20px;
|
|
border-radius: 8px;
|
|
font-size: 0.95rem;
|
|
overflow: auto;
|
|
background: $light-background-secondary;
|
|
|
|
th {
|
|
padding: 8px 4px;
|
|
|
|
word-break: normal;
|
|
overflow-wrap: normal;
|
|
}
|
|
|
|
td {
|
|
padding: 6px 4px;
|
|
|
|
border-top: 1px solid $light-color-secondary;
|
|
}
|
|
|
|
.dark-theme & {
|
|
background: $dark-background-secondary;
|
|
|
|
td {
|
|
border-top-color: $dark-color-secondary;
|
|
}
|
|
}
|
|
}
|
|
|
|
.feather {
|
|
display: inline-block;
|
|
vertical-align: -0.125em;
|
|
width: 1em;
|
|
height: 1em;
|
|
}
|
|
|
|
.nostyle {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.breadcrumbs {
|
|
display: inline;
|
|
|
|
ol {
|
|
list-style-type: none;
|
|
margin: 0;
|
|
display: inline;
|
|
|
|
li {
|
|
display: inline;
|
|
|
|
&::after {
|
|
content: " > ";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.article-heading {
|
|
a {
|
|
position: relative;
|
|
text-decoration: none;
|
|
|
|
--link-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>');
|
|
--check-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="green" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>');
|
|
|
|
--background-image: var(--link-image);
|
|
|
|
&.current-heading {
|
|
--background-image: var(--check-image);
|
|
}
|
|
|
|
&:hover {
|
|
&::before {
|
|
content: " ";
|
|
display: inline-block;
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
height: 100%;
|
|
|
|
background-image: var(--background-image);
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: auto 50%;
|
|
}
|
|
}
|
|
|
|
@media #{$media-size-tablet-min} {
|
|
&:hover {
|
|
&::before {
|
|
right: 100%;
|
|
width: 1.5em;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media #{$media-size-tablet} {
|
|
&:hover {
|
|
&::before {
|
|
left: 100%;
|
|
width: 1.2em;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.highlight {
|
|
position: relative;
|
|
|
|
&:has(table) {
|
|
margin: 0.95em 0;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
pre {
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
|
|
.line {
|
|
padding-left: 20px;
|
|
padding-right: 10px;
|
|
}
|
|
}
|
|
|
|
code {
|
|
display: block;
|
|
width: max-content;
|
|
min-width: 100%;
|
|
}
|
|
|
|
table {
|
|
width: 100% !important;
|
|
display: block;
|
|
background: inherit;
|
|
position: relative;
|
|
border-radius: 0;
|
|
font-size: inherit;
|
|
|
|
tbody {
|
|
display: block;
|
|
|
|
tr {
|
|
display: flex;
|
|
flex-direction: row;
|
|
|
|
td {
|
|
overflow-wrap: anywhere;
|
|
word-break: normal;
|
|
width: 1px; // flex will override
|
|
|
|
pre {
|
|
margin: 0;
|
|
|
|
@media #{$media-size-phone} {
|
|
white-space: pre;
|
|
}
|
|
}
|
|
|
|
&:first-of-type {
|
|
// line numbers
|
|
flex: 0 0 max-content;
|
|
|
|
.lnt {
|
|
padding-left: 14px;
|
|
padding-right: 14px;
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
|
|
&:last-of-type {
|
|
// code
|
|
flex: 1 1 auto;
|
|
|
|
pre {
|
|
padding-left: 0px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.codeblock-copy {
|
|
@mixin code-copy-background($color) {
|
|
$color: "rgb(" + red($color) + "," + green($color) + "," +
|
|
blue($color) + ")";
|
|
|
|
background-image: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#{$color}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>');
|
|
}
|
|
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 10px;
|
|
display: block;
|
|
width: 26px;
|
|
height: 26px;
|
|
border: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
border-radius: 6px;
|
|
background: none;
|
|
background-color: inherit;
|
|
|
|
@include code-copy-background(#adadad);
|
|
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: auto 65%;
|
|
|
|
&.current-code {
|
|
--selected-code-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="rgb(52, 184, 0)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>');
|
|
|
|
background-image: var(--selected-code-image);
|
|
|
|
&:hover {
|
|
background-image: var(--selected-code-image);
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
@include code-copy-background(#ffffff);
|
|
}
|
|
}
|
|
}
|
|
|