Files
blog/sass/_typography.scss

155 lines
2.5 KiB
SCSS

// HEADINGS
h1,
h2,
h3,
h4,
h5,
h6 {
text-wrap: balance;
margin: 3rem 0 1rem;
font-weight: lighter;
font-family: var(--font-antique);
letter-spacing: -0.05em;
}
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 2rem;
}
h3 {
font-size: 1.5rem;
}
small {
color: var(--fg-muted-5);
font-size: 0.875rem;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
cursor: help;
text-decoration: underline dotted;
}
figcaption {
color: var(--fg-muted-4);
font-size: 0.875rem;
text-align: center;
}
blockquote {
margin: 0;
border-left: 0.25rem solid var(--primary-color);
border-radius: 0.25rem;
padding: 0 0.75rem;
color: var(--fg-muted-5);
:root[dir="rtl"] & {
border-right: 0.25rem solid var(--primary-color);
border-left: unset;
}
}
mark {
box-shadow: var(--edge-highlight);
border-radius: var(--rounded-corner-small);
background-color: var(--primary-color-alpha);
padding: 0.125rem 0.375rem;
color: var(--primary-color);
}
kbd {
display: inline-block;
transition: var(--transition);
cursor: pointer;
box-shadow: inset 0 -2px 0 var(--fg-muted-2), 0 -1px 0 var(--fg-muted-3);
border-radius: var(--rounded-corner-small);
background-color: var(--fg-muted-2);
padding: 0.125rem 0.375rem;
font-size: 0.875rem;
line-height: normal;
// Small nice thingy, keys can be pressed!
&:active {
transform: translateY(0.125rem);
box-shadow: inset 0 1px 0 var(--fg-muted-2);
background-color: var(--fg-muted-3);
}
}
a {
color: var(--primary-color);
font-weight: bold;
&:hover {
-webkit-text-decoration: underline wavy;
text-decoration: underline wavy;
}
}
hr {
margin: 2rem auto;
border: none;
border-top: 3px double var(--fg-muted-2);
overflow: visible;
color: var(--fg-muted-4);
font-size: 1.5rem;
text-align: center;
&::after {
position: relative;
top: -1.5rem;
background: var(--bg-color), var(--primary-color);
padding: 0 0.25rem;
content: "☙❧";
// An ugly hack to fix mirroring in rtl
:root[dir="rtl"] & {
content: "❧☙";
}
}
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 1rem;
}
aside {
float: right;
margin-inline-start: 1rem;
box-shadow: var(--edge-highlight);
border-radius: var(--rounded-corner);
background-color: var(--primary-color-alpha);
padding: 1rem;
width: 30%;
:root[dir="rtl"] & {
float: left;
}
@media only screen and (max-width: 720px) {
float: none;
margin-inline-start: 0;
width: 100%;
}
}
details {
box-shadow: var(--edge-highlight);
border-radius: var(--rounded-corner);
background-color: var(--fg-muted-1);
padding: 1rem;
&>summary {
cursor: pointer;
}
}