// Variables (can be moved to a separate variables file if needed) $font-size: var(--content-font-size); $link-color: var(--link-color); $secondary-text-color: var(--secondary-text-color); $border-color: var(--border-color); $block-background-color: var(--block-background-color); $strong-text-color: #A94A4A; $em-text-color: #889E73; // Mixin for block styles @mixin block-style($margin, $padding, $color: null, $border-left: null) { margin: $margin; padding: $padding; @if $color { color: $color; } @if $border-left { border-left: $border-left; } } // Main styles .markdown-body { font-size: $font-size; max-width: 100%; // Nested styles for child elements a { text-decoration: underline; color: $link-color; &.external-link::after { content: ''; display: inline-block; width: 0.9em; height: 0.9em; background-image: url('/img/external-link.svg'); background-size: cover; @media (prefers-color-scheme: dark) { filter: invert(1); } } } blockquote { @include block-style(0, 0 1em, $secondary-text-color, 0.2em solid $border-color); padding-right: 0; &:not(blockquote > blockquote) { @media screen and (min-width: 768px) { margin-left: -1.4rem; } } } code { font-size: 90%; color: var(--secondary-text-color); &:not(pre > code)::before, &:not(pre > code)::after { content: '`' } } pre { padding: 0.5rem 1rem; font-size: 1rem; border-radius: 5px; border-top-right-radius: 0; position: relative; & > code { padding: 0; color: unset; background-color: inherit; border: 0; &:not([data-lang="fallback"])::before { --width: 1rem; content: attr(data-lang); display: block; box-sizing: border-box; line-height: 1rem; position: absolute; top: 0; right: -1rem; width: var(--width); min-height: 2.5rem; writing-mode: vertical-rl; text-align: center; font-size: 0.75em; background: #333; color: #fff; padding: 0.5rem 0; border-radius: 0 4px 4px 0; } } } p { hyphens: auto; text-justify: ideographic; margin-bottom: 1em; } strong { color: $strong-text-color; } em { color: $em-text-color; } img { max-width: 100%; display: block; margin: 1rem auto; } figure { display: block; margin: 0; figcaption { max-width: 100%; h4 { font-size: 0.9rem; color: var(--secondary-text-color); font-weight: 400; text-align: center; white-space: normal; } } } ul { list-style-type: square; } ul, ol { padding-inline-start: 1.75rem; li { padding-left: 0.25rem; } ::marker { color: var(--secondary-text-color); } } mark { background-color: rgba(255, 235, 0, .5) } .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; table { border-collapse: collapse; table-layout: fixed; min-width: 100%; width: max-content; border-top: 2px solid var(--border-color); tr { border-bottom: 1px solid var(--border-color); } td, th { max-width: 200px; padding: 0.5rem 1rem; line-height: 1.5; white-space: normal; word-wrap: break-word; } } } del { opacity: 0.5 } iframe { max-width: 100%; } } /* additional elements */ .link-icon img { width: 0.8em; height: 0.8em; display: inline; opacity: 0.7; }