Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUO-325] Correctly display a transparent background for underline blanks #1587

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading