From 05a7c3fc6fad509f9aacae110fa067633a69d289 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 11 Apr 2023 16:45:27 +0200 Subject: [PATCH] Add superscript and subscript inline text styles Resolves MS-631 #complete --- client/src/styles/_typography.scss | 14 ++++++++++++++ server/core/constants.py | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/client/src/styles/_typography.scss b/client/src/styles/_typography.scss index 422fd540..eafc5a38 100644 --- a/client/src/styles/_typography.scss +++ b/client/src/styles/_typography.scss @@ -82,6 +82,20 @@ button { box-sizing: border-box; } +sup, +sub { + font-size: toRem(14px); + line-height: normal; +} + +sup { + vertical-align: super; +} + +sub { + vertical-align: sub; +} + .small-emph { font-size: toRem($base-font-size-pixels); margin-bottom: 7.5px; diff --git a/server/core/constants.py b/server/core/constants.py index 17f1f882..2dec2061 100644 --- a/server/core/constants.py +++ b/server/core/constants.py @@ -1,2 +1,2 @@ -DEFAULT_RICH_TEXT_FEATURES = ['ul', 'bold'] -INSTRUMENTS_RICH_TEXT_FEATURES = ['bold', 'ul', 'brand', 'secondary'] +DEFAULT_RICH_TEXT_FEATURES = ["ul", "bold", "subscript", "superscript"] +INSTRUMENTS_RICH_TEXT_FEATURES = DEFAULT_RICH_TEXT_FEATURES + ["brand", "secondary"]