From 5a7e31bc9868558191664fc0b96c7baf7572e26d Mon Sep 17 00:00:00 2001 From: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Date: Sat, 11 Dec 2021 00:42:03 +0800 Subject: [PATCH] update selection styling to use css variable (#10437) --- app/src/interfaces/input-rich-text-html/get-editor-styles.ts | 3 +++ app/src/styles/_base.scss | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/interfaces/input-rich-text-html/get-editor-styles.ts b/app/src/interfaces/input-rich-text-html/get-editor-styles.ts index b35d9257cb..7fb056a0b8 100644 --- a/app/src/interfaces/input-rich-text-html/get-editor-styles.ts +++ b/app/src/interfaces/input-rich-text-html/get-editor-styles.ts @@ -23,6 +23,9 @@ export default function getEditorStyles(font: 'sans-serif' | 'serif' | 'monospac url(${merriweatherRegular}) format('woff'); } +::selection { + background: ${cssVar('--background-normal-alt')}; +} body { color: ${cssVar('--foreground-normal')}; background-color: ${cssVar('--background-input')}; diff --git a/app/src/styles/_base.scss b/app/src/styles/_base.scss index 5413fc06de..2a71934af8 100644 --- a/app/src/styles/_base.scss +++ b/app/src/styles/_base.scss @@ -108,7 +108,7 @@ strong { } ::selection { - background: #e1f0fa; + background: var('--background-normal-alt'); } dl > div {