Skip to content

Commit

Permalink
ensure a styles are inherited only within p
Browse files Browse the repository at this point in the history
  • Loading branch information
charbelrami committed Jan 9, 2024
1 parent a79f3b4 commit e4d304b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Nri/Ui/ClickableText/V4.elm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ import Html.Styled.Attributes as Attributes
import Nri.Ui
import Nri.Ui.Colors.V1 as Colors
import Nri.Ui.FocusRing.V1 as FocusRing
import Nri.Ui.Fonts.V1 as Fonts
import Nri.Ui.Html.Attributes.V2 as ExtraAttributes
import Nri.Ui.MediaQuery.V1 as MediaQuery
import Nri.Ui.Svg.V1 as Svg exposing (Svg)
Expand Down Expand Up @@ -527,8 +528,8 @@ clickableTextSharedStyles : Bool -> List Css.Style
clickableTextSharedStyles isDisabled =
let
baseStyles =
[ Css.fontFamily Css.inherit
, Css.fontWeight Css.inherit
[ Fonts.baseFont
, Css.fontWeight (Css.int 600)
]
in
if isDisabled then
Expand All @@ -546,6 +547,7 @@ clickableTextSharedStyles isDisabled =
clickableTextLinkStyles : List Css.Style
clickableTextLinkStyles =
[ Css.textDecoration Css.none
, Css.display Css.inlineBlock
]


Expand Down
8 changes: 8 additions & 0 deletions src/Nri/Ui/Text/V6.elm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ You're in the wrong place! Headings live in Nri.Ui.Heading.V3.
import Accessibility.Styled as Html exposing (..)
import Content
import Css exposing (..)
import Css.Global exposing (children, typeSelector)
import Html.Styled.Attributes as Attributes
import MarkdownStyles
import Nri.Ui.Colors.V1 exposing (..)
Expand Down Expand Up @@ -263,6 +264,13 @@ paragraphStyles config =
, lastChild
[ margin zero
]
, children
[ typeSelector "a"
[ Css.fontFamily Css.inherit
, Css.fontWeight Css.inherit
, Css.display Css.inline
]
]
]


Expand Down

0 comments on commit e4d304b

Please sign in to comment.