From c9495c8021f3f9957e7c50e42c78ea6af226ae56 Mon Sep 17 00:00:00 2001 From: Lars Olesen Date: Mon, 11 Nov 2024 21:32:39 +0100 Subject: [PATCH 1/3] Added names from modern font stack for easy switching of fonts --- _sass/minimal-mistakes/_variables.scss | 31 ++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/_sass/minimal-mistakes/_variables.scss b/_sass/minimal-mistakes/_variables.scss index 2a3258735264..753a71691d01 100644 --- a/_sass/minimal-mistakes/_variables.scss +++ b/_sass/minimal-mistakes/_variables.scss @@ -15,11 +15,34 @@ $doc-font-size-x-large: $doc-font-size * 1.375 !default; $paragraph-indent: false !default; // true, false (default) $indent-var: 1.3em !default; +/* Modern font stack */ +/* https://github.com/system-fonts/modern-font-stacks */ +$system-ui: system-ui, sans-serif; +$transitional: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif; +$old-style: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;; +$humanist: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif; +$geometric-humanist: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif; +$classical-humanist: Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif; +$neo-grotesque: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif; +$monospace-slab-serif: 'Nimbus Mono PS', 'Courier New', monospace; +$monospace-code: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; +$industrial: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif; +$rounded-sans: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif; +$slab-serif: Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif; +$antique: Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif; +$didone: Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif; +$handwritten: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive; + +$default-sans-serif: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif; +$default-serif: Georgia, Times, serif; +$default-monospace: Monaco, Consolas, "Lucida Console", monospace; + +$emoji-native: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + /* system typefaces */ -$serif: Georgia, Times, serif !default; -$sans-serif: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", - "Helvetica Neue", "Lucida Grande", Arial, sans-serif !default; -$monospace: Monaco, Consolas, "Lucida Console", monospace !default; +$serif: $default-serif !default; +$sans-serif: $default-sans-serif !default; +$monospace: $default-monospace !default; /* sans serif typefaces */ $sans-serif-narrow: $sans-serif !default; From 7e0c05738aad926ae23620f41c52b7500931aae2 Mon Sep 17 00:00:00 2001 From: Lars Olesen Date: Mon, 11 Nov 2024 21:43:04 +0100 Subject: [PATCH 2/3] Fixes order a bit --- _sass/minimal-mistakes/_variables.scss | 40 ++++++++++++++++---------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/_sass/minimal-mistakes/_variables.scss b/_sass/minimal-mistakes/_variables.scss index 753a71691d01..82844dd8be30 100644 --- a/_sass/minimal-mistakes/_variables.scss +++ b/_sass/minimal-mistakes/_variables.scss @@ -17,43 +17,53 @@ $indent-var: 1.3em !default; /* Modern font stack */ /* https://github.com/system-fonts/modern-font-stacks */ + +/* Sans serif - modern font stack */ $system-ui: system-ui, sans-serif; -$transitional: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif; -$old-style: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;; $humanist: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif; $geometric-humanist: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif; $classical-humanist: Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif; $neo-grotesque: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif; -$monospace-slab-serif: 'Nimbus Mono PS', 'Courier New', monospace; -$monospace-code: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; $industrial: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif; $rounded-sans: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif; + +/* sans serif typefaces - defined in Minimal Mistakes */ +$helvetica: Helvetica, "Helvetica Neue", Arial, sans-serif !default; + +/* Serif - modern font stack */ +$transitional: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif; +$old-style: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;; +$monospace-slab-serif: 'Nimbus Mono PS', 'Courier New', monospace; $slab-serif: Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif; $antique: Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif; $didone: Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif; + +/* serif typefaces - defined in Minimal Mistakes */ +$georgia: Georgia, serif !default; +$times: Times, serif !default; +$bodoni: "Bodoni MT", serif !default; +$calisto: "Calisto MT", serif !default; +$garamond: Garamond, serif !default; + +/* Monospace - modern font stack */ +$monospace-code: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; + +/* Handwritten - modern font stack */ $handwritten: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive; +/* Defaults used in Minimal mistakes */ $default-sans-serif: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif; $default-serif: Georgia, Times, serif; $default-monospace: Monaco, Consolas, "Lucida Console", monospace; +/* Emoji native from modern font stack - add to the end of the font-face for native emojis */ $emoji-native: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; /* system typefaces */ $serif: $default-serif !default; $sans-serif: $default-sans-serif !default; -$monospace: $default-monospace !default; - -/* sans serif typefaces */ $sans-serif-narrow: $sans-serif !default; -$helvetica: Helvetica, "Helvetica Neue", Arial, sans-serif !default; - -/* serif typefaces */ -$georgia: Georgia, serif !default; -$times: Times, serif !default; -$bodoni: "Bodoni MT", serif !default; -$calisto: "Calisto MT", serif !default; -$garamond: Garamond, serif !default; +$monospace: $default-monospace !default; $global-font-family: $sans-serif !default; $header-font-family: $sans-serif !default; From ea9a861186d2c9582accae7b000f07d4b5f741b8 Mon Sep 17 00:00:00 2001 From: Lars Olesen Date: Mon, 11 Nov 2024 21:46:41 +0100 Subject: [PATCH 3/3] Added anti-aliasing to fonts --- _sass/minimal-mistakes/_base.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_sass/minimal-mistakes/_base.scss b/_sass/minimal-mistakes/_base.scss index d52a42f2bc03..48e98b295b10 100644 --- a/_sass/minimal-mistakes/_base.scss +++ b/_sass/minimal-mistakes/_base.scss @@ -6,6 +6,8 @@ html { /* sticky footer fix */ position: relative; min-height: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } body {