diff --git a/src/Main.elm b/src/Main.elm index d0bbdeb..a34de7b 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -638,13 +638,6 @@ viewNavLink activeId now { id, node, updated } = -- it's always text! , Text.text - , Css.Global.descendants - [ Css.Global.everything - [ Css.textOverflow Css.ellipsis - , Css.overflow Css.hidden - , Css.whiteSpace Css.noWrap - ] - ] -- content layout , Css.property "display" "grid" @@ -681,6 +674,11 @@ viewNavLink activeId now { id, node, updated } = [ css [ Css.property "grid-area" "title" , Css.textAlign Css.left + , Css.height (Css.calc Text.textLineHeight Css.plus Text.textLineHeight) + , Css.property "display" "-webkit-box" + , Css.property "-webkit-line-clamp" "2" + , Css.property "-webkit-box-orient" "vertical" + , Css.overflow Css.hidden ] ] (Node.content node) diff --git a/src/Widgets/Text.elm b/src/Widgets/Text.elm index b7d646b..cd4b10b 100644 --- a/src/Widgets/Text.elm +++ b/src/Widgets/Text.elm @@ -1,4 +1,4 @@ -module Widgets.Text exposing (h1, text) +module Widgets.Text exposing (h1, text, textLineHeight) import Css exposing (Style) import Widgets.Colors as Colors @@ -8,12 +8,17 @@ text : Style text = Css.batch [ Css.fontSize (Css.px 18) - , Css.lineHeight (Css.px 27) + , Css.lineHeight textLineHeight , Css.color (Colors.toCss Colors.blackDark) , Css.fontFamilies [ Css.fontFace "San Francisco", Css.fontFace "Arial", Css.sansSerif.value ] ] +textLineHeight : Css.Px +textLineHeight = + Css.px 27 + + h1 : Style h1 = Css.batch