[doc] Ensure code blocks are rendered properly in Chrome
Chrome has a bug which doesn't assign the right font size (16px) to code
blocks (https://bugs.chromium.org/p/chromium/issues/detail?id=833697).
Fix that by explicitly setting the default font size in the html element
(16px in most browsers).
Now Firefox and Chrome render code blocks the same, both in 16px.
Signed-off-by: Philipp Wagner <phw@lowrisc.org>
diff --git a/site/docs/assets/scss/_base.scss b/site/docs/assets/scss/_base.scss
index 9f6d3f8..a950d13 100644
--- a/site/docs/assets/scss/_base.scss
+++ b/site/docs/assets/scss/_base.scss
@@ -2,7 +2,12 @@
// HTML & Body
html {
- font-size: 1rem;
+ /*
+ Explicitly set the font size to the typical browser default to work around a
+ bug in Chrome where <code> elements don't get the right font size when using
+ @font-size=1rem (https://bugs.chromium.org/p/chromium/issues/detail?id=833697)
+ */
+ font-size: 16px;
scroll-behavior: smooth;
}