Default to system-ui font stack. Set colour on heading and code. Set font weight on headings.

This commit is contained in:
Fredrik Jonsson 2023-02-11 21:23:34 +01:00
commit 702f7f39e3
3 changed files with 44 additions and 40 deletions

View file

@ -3,12 +3,14 @@
// Document
html {
// Change the default font family in all browsers (opinionated).
// Change the default font family in all browsers.
font-family: var(--ff-body);
// Set base font size in percent.
font-size: calc(#{$base-font-size} / 16 * 100%);
// Correct the line height in all browsers.
line-height: $base-line-height;
// Set text colour.
color: var(--color-text);
// Prevent adjustments of font size.
-webkit-text-size-adjust: none;
text-size-adjust: none;

View file

@ -1,7 +1,7 @@
// Sections
body {
// Remove the margin in all browsers (opinionated).
// Remove the margin in all browsers.
margin: 0;
padding: 0;
}
@ -10,47 +10,54 @@ body {
//
// All HTML headings, `<h1>` through `<h6>`, are available. `%h1` through `%h6`
// classes are also available, for when you want to match the font styling of a
// heading but still want your text to be displayed inline.
// heading but not be a heading.
h1,
%h1,
h2,
%h2,
h3,
%h3,
h4,
%h4,
h5,
%h5,
h6,
%h6 {
@include margin-block(1);
color: var(--color-headings);
font-family: var(--ff-headings);
font-weight: var(--fw-headings);
line-height: var(--heading-line-height);
}
h1,
%h1 {
@include margin-block(1);
font-size: var(--fs-xxl);
line-height: var(--heading-line-height);
}
h2,
%h2 {
@include margin-block(1);
font-size: var(--fs-xl);
line-height: var(--heading-line-height);
}
h3,
%h3 {
@include margin-block(1);
font-size: var(--fs-l);
line-height: var(--heading-line-height);
}
h4,
%h4 {
@include margin-block(1);
font-size: var(--fs-m);
line-height: var(--heading-line-height);
}
h5,
%h5 {
@include margin-block(1);
font-size: var(--fs-s);
line-height: var(--heading-line-height);
}
h6,
%h6 {
@include margin-block(1);
font-size: var(--fs-xs);
line-height: var(--heading-line-height);
}
// Set max text line width for readability.

View file

@ -7,6 +7,7 @@
code,
kbd,
samp {
color: var(--color-code);
font-family: var(--ff-monospace);
}