website/assets/scss/extend.scss

206 lines
3.2 KiB
SCSS
Raw Normal View History

2020-11-05 04:34:37 +00:00
:root {
--accented-border-style: var(--base0C) solid .1vw;
--code-size: 50vh;
2021-01-20 07:01:56 +00:00
--body-family: "Source Serif Pro", "IBM Plex Serif", "Noto Serif", serif;
--header-family: "Source Sans Pro", "IBM Plex Sans", "Noto Sans", sans-serif;
--mono-family: "Source Code Pro", "IBM Plex Mono", "Noto Mono", monospace;
color: var(--base05);
2019-09-28 12:15:00 +00:00
}
pre, code {
max-height: var(--code-size);
}
2020-11-06 22:16:12 +00:00
// Layouts
2021-01-20 07:01:56 +00:00
.site__title {
--size: 2rem;
margin-bottom: unset;
font-size: var(--size);
2021-01-21 21:07:48 +00:00
line-height: unset;
2021-01-20 07:01:56 +00:00
}
2020-11-06 22:16:12 +00:00
.site__socials {
margin-top: 1em;
}
2021-01-21 21:07:48 +00:00
.site__social-icon svg {
fill: currentColor;
}
article.post {
padding: 0.5em;
background: var(--base01);
}
2020-11-05 04:34:37 +00:00
.post__meta--single {
p > span:first-child {
white-space: nowrap;
}
2019-09-28 12:15:00 +00:00
}
#TableOfContents {
> ul {
padding-left: 0;
list-style: none;
}
ul ul {
list-style: none;
padding-left: 1.5em;
}
}
// Custom layouts
2021-01-21 21:07:48 +00:00
// Asciidoctor roles (e.g., [.text-center]) on a block.
.text-center {
text-align: center;
}
.line-through {
text-decoration: line-through;
}
#logo {
svg {
--size: 4em;
height: var(--size);
width: var(--size);
fill: var(--base0C);
&:hover {
fill: var(--base08);
animation: rainbow 2s ease infinite;
}
}
}
@keyframes rainbow {
@for $i from 0 through 8 {
#{$i * 10}% { fill: var(--base#{decToHex($i + 7)}); }
}
}
[data-tooltip] {
&::before {
--scale: 0;
background: var(--base01);
content: attr(data-tooltip);
font-size: 0.8em;
padding: 0.5em;
position: absolute;
transform: translateY(var(--translate-y, -50%)) scale(var(--scale));
transform-origin: bottom center;
width: max-content;
max-width: 100%;
}
&:hover::before {
--scale: 1;
}
}
2020-11-05 04:34:37 +00:00
// Prism CSS
code[class*="language-"], pre[class*="language-"] {
color: var(--base05);
2019-09-28 12:15:00 +00:00
}
2021-01-21 21:07:48 +00:00
2020-11-05 04:34:37 +00:00
// Asciidoctor-specific styles
sup.footnote {
vertical-align: baseline;
position: relative;
top: 0;
left: 0;
font-size: 1rem;
}
2020-11-05 04:34:37 +00:00
.anchor {
border-bottom: unset;
&:hover {
border-bottom: unset;
}
2020-11-05 04:34:37 +00:00
&::before {
content: "§";
display: inline-block;
margin-right: 0.25em;
}
}
.conum {
color: var(--base05) !important;
background-color: var(--base02);
user-select: none;
}
2020-11-05 04:34:37 +00:00
.quoteblock {
blockquote {
border: var(--accented-border-style);
margin: auto;
padding: 1em 0.5em;
}
}
2019-09-28 12:15:00 +00:00
2020-11-05 04:34:37 +00:00
@keyframes target-fade {
0% {
background: var(--base0D);
color: unset;
}
100% {
background-color: transparent;
}
2019-09-28 12:15:00 +00:00
}
2020-11-05 04:34:37 +00:00
#footnotes > *:not(hr) {
2020-11-05 07:30:02 +00:00
line-height: 1.45;
2020-11-05 04:34:37 +00:00
margin: 1em;
}
*:not(.listingblock) {
> *.attribution,
> *.title {
2020-11-06 11:44:15 +00:00
background: var(--base0C);
2020-11-05 04:34:37 +00:00
color: var(--base00);
font-size: 0.9em;
padding: 0.5em;
2020-11-06 22:16:12 +00:00
&::selection {
background: var(--base07);
}
2020-11-05 04:34:37 +00:00
}
> *.content {
border: var(--accented-border-style);
padding: 0.5em;
}
}
2019-09-28 12:15:00 +00:00
2020-11-05 04:34:37 +00:00
.admonitionblock {
.icon {
2020-11-06 11:44:15 +00:00
background: var(--base0C);
2020-11-05 04:34:37 +00:00
border: var(--accented-border-style);
vertical-align: middle;
}
2019-09-28 12:15:00 +00:00
}
2020-11-05 04:34:37 +00:00
.imageblock {
> .content {
2019-09-28 12:15:00 +00:00
display: flex;
justify-content: center;
2020-11-05 04:34:37 +00:00
}
2021-01-20 07:01:56 +00:00
> .title {
text-align: center;
}
2019-09-28 12:15:00 +00:00
}
2020-11-06 22:16:12 +00:00
@media all and (max-width: 860px) {
.imageblock {
> .content {
width: 100% !important;
}
}
}