Skip to content

Commit

Permalink
Correctly display a transparent background for underline blanks
Browse files Browse the repository at this point in the history
  • Loading branch information
Lindsay Wardell committed Jan 4, 2024
1 parent b87e56d commit 8e6560b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Nri/Ui/Block/V6.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8e6560b

Please sign in to comment.