From b1cfccfb7661126745b963b49e50f0678d5a2e46 Mon Sep 17 00:00:00 2001 From: Farhanam76 Date: Tue, 7 May 2024 10:20:20 +0100 Subject: [PATCH] Updated the highlight text contrast for design and preview --- eq-author/src/components/RichTextEditor/index.js | 4 +++- eq-author/src/components/preview/elements/PageTitle.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eq-author/src/components/RichTextEditor/index.js b/eq-author/src/components/RichTextEditor/index.js index 47e16b64db..d64efb2ef0 100644 --- a/eq-author/src/components/RichTextEditor/index.js +++ b/eq-author/src/components/RichTextEditor/index.js @@ -31,10 +31,12 @@ import PasteModal, { preserveRichFormatting, } from "components/modals/PasteModal"; +import { colors } from "../../constants/theme"; + const styleMap = (controls) => { return { BOLD: { - backgroundColor: controls.highlight && "#cbe2c8", + backgroundColor: controls.highlight && colors.neonYellow, fontWeight: controls.bold && "bold", }, }; diff --git a/eq-author/src/components/preview/elements/PageTitle.js b/eq-author/src/components/preview/elements/PageTitle.js index d77f2589d3..ad8ff4ef6e 100644 --- a/eq-author/src/components/preview/elements/PageTitle.js +++ b/eq-author/src/components/preview/elements/PageTitle.js @@ -4,12 +4,14 @@ import styled from "styled-components"; import Error from "components/preview/Error"; +import { colors } from "../../../constants/theme"; + const Title = styled.h1` font-size: 1.4em; margin: 0 0 1em; word-wrap: break-word; strong { - background-color: #dce5b0; + background-color: ${colors.neonYellow}; padding: 0 0.125em; font-style: normal; }