From 2fea56322efb096321175faa9d5773a36bc34d49 Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Fri, 18 Oct 2019 11:29:28 +0100 Subject: [PATCH] Add relative font-sizes for code elements This means when users change their font size that these elements will scale alongside the rest of the text. We leave the pixel font sizes as fallbacks for older browsers. Fixes https://github.com/alphagov/tech-docs-gem/issues/127 --- lib/assets/stylesheets/modules/_technical-documentation.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/assets/stylesheets/modules/_technical-documentation.scss b/lib/assets/stylesheets/modules/_technical-documentation.scss index 789ef787..d40bad10 100644 --- a/lib/assets/stylesheets/modules/_technical-documentation.scss +++ b/lib/assets/stylesheets/modules/_technical-documentation.scss @@ -132,10 +132,12 @@ font-family: monaco, Consolas, "Lucida Console", monospace; font-size: 15px; + font-size: 0.9375rem; color: $code-0E; @include govuk-media-query(tablet) { font-size: 16px; + font-size: 1rem; } // Handle long strings (URLs, long variable names, etc) by allowing them