From e48cc44cbac31bccd052fea0a267b862e93b9288 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 19 May 2019 17:41:18 +0100 Subject: [PATCH] apply monospace font correctly --- res/css/_common.scss | 4 ++++ res/css/views/rooms/_EventTile.scss | 1 + res/themes/light/css/_light.scss | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/res/css/_common.scss b/res/css/_common.scss index 25c0c8a8b5..b96836a2e1 100644 --- a/res/css/_common.scss +++ b/res/css/_common.scss @@ -32,6 +32,10 @@ body { margin: 0px; } +code { + font-family: $monospace-font-family; +} + .error, .warning { color: $warning-color; } diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index d3e2684d4a..173b6db536 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -411,6 +411,7 @@ limitations under the License. .mx_EventTile_content .markdown-body { pre, code { + font-family: $monospace-font-family ! important; // deliberate constants as we're behind an invert filter color: #333; } diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index c4de8ecdd3..03b9e328bc 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -7,6 +7,10 @@ to native Emoji fonts (if any) to ensure cross-browser consistency */ $font-family: Nunito, Arial, Helvetica, Sans-Serif, 'Twemoji Mozilla'; +// XXX: In theory this should be Fira, but it's a bit ugly. +// TODO: make it consistent cross-browser +$monospace-font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace, 'Twemoji Mozilla'; + // unified palette // try to use these colors when possible $accent-color: #03b381;