From 8e6560b9aeb063b3066f4f380a1c64b7fefb4912 Mon Sep 17 00:00:00 2001 From: Lindsay Wardell Date: Thu, 4 Jan 2024 10:45:38 -0800 Subject: [PATCH] Correctly display a transparent background for underline blanks --- src/Nri/Ui/Block/V6.elm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Nri/Ui/Block/V6.elm b/src/Nri/Ui/Block/V6.elm index bd3fadbe4..5b4af2281 100644 --- a/src/Nri/Ui/Block/V6.elm +++ b/src/Nri/Ui/Block/V6.elm @@ -26,6 +26,7 @@ module Nri.Ui.Block.V6 exposing Add renderReadAloud Add border styles `dashed` and `underline` + Correctly display a transparent background for underline blanks @docs view, renderReadAloud, Attribute @@ -737,12 +738,19 @@ viewBlank borderStyle blankHeight (CharacterWidth width) = Css.border3 (Css.px 2) Css.dashed Colors.navy Underline -> - Css.borderBottom3 (Css.px 2) Css.solid Colors.navy + Css.borderBottom2 (Css.px 2) Css.solid , MediaQuery.highContrastMode [ Css.property "border-color" "CanvasText" , Css.property "background-color" "Canvas" ] - , Css.backgroundColor Colors.white + , Css.backgroundColor + (case borderStyle of + Dashed -> + Colors.white + + Underline -> + Css.rgba 0 0 0 0 + ) , Css.width <| Css.em (min 30 <| max 0.83 (toFloat width * 0.5)) , Css.display Css.inlineBlock , Css.borderRadius