Skip to content

Commit

Permalink
tweak some stuff in the sidebar to make it look nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed May 14, 2020
1 parent 2a3a290 commit 340e01a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/Main.elm
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 7 additions & 2 deletions 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
Expand All @@ -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
Expand Down

0 comments on commit 340e01a

Please sign in to comment.