From c6937e03370fcb94ad8497df8c2e906341fa914c Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Mon, 27 Jan 2025 12:43:50 +0000 Subject: [PATCH] Disable apple-system-body font for Mac OS --- CHANGELOG.md | 3 +++ src/nationalarchives/utilities/_reset.scss | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 624890d7..40171349 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated ### Removed + +- Disabled `-apple-system-body` for dynamic type support in non-touch Apple devices due to issues in Mac OS + ### Fixed - If cookie policies are invalid or missing when the cookie class is initiated, the cookie banner is shown regardless of the existance of a `cookie_preferences_set` cookie diff --git a/src/nationalarchives/utilities/_reset.scss b/src/nationalarchives/utilities/_reset.scss index 610a8e3c..6e570882 100644 --- a/src/nationalarchives/utilities/_reset.scss +++ b/src/nationalarchives/utilities/_reset.scss @@ -1,4 +1,5 @@ @use "../tools/colour"; +@use "../tools/typography"; * { margin: 0; @@ -39,6 +40,20 @@ } } +/* + * ------------------------------------------ + * Disable Apple's Dynamic Type for non-touch + * devices (like Mac OS), because the default + * system body size is defined as 13px rather + * than 16px like on other devices + * ------------------------------------------ + */ +@supports (font: -apple-system-body) and (not (-webkit-touch-callout: default)) { + html { + @include typography.font-size(16); + } +} + img, svg, picture,