git.iko.soy/typeable/elm-ui
on master help sign in
Resolves #172, horizontal labels should be baseline-aligned by default
commit5b7dc58fb14e3d4e53a4ca0bc5e20cc9dea5e93f authormdgriffith <mdgriffith@users.noreply.github.com> dateWed 20 May 2020, 09:40 (6 years ago) parent4d7e114
2 files changed+8−4
src/Element/Input.elm+4−4 src/Internal/Style.elm+4
src/Element/Input.elm+4−4
@@ -1612,28 +1612,28 @@ applyLabel attrs label input =
16121612 Internal.element
16131613 Internal.asColumn
16141614 (Internal.NodeName "label")
1615− attrs
1615+ (Internal.htmlClass classes.inputLabel :: attrs)
16161616 (Internal.Unkeyed [ labelElement, input ])
16171617
16181618 Below ->
16191619 Internal.element
16201620 Internal.asColumn
16211621 (Internal.NodeName "label")
1622− attrs
1622+ (Internal.htmlClass classes.inputLabel :: attrs)
16231623 (Internal.Unkeyed [ input, labelElement ])
16241624
16251625 OnRight ->
16261626 Internal.element
16271627 Internal.asRow
16281628 (Internal.NodeName "label")
1629− attrs
1629+ (Internal.htmlClass classes.inputLabel :: attrs)
16301630 (Internal.Unkeyed [ input, labelElement ])
16311631
16321632 OnLeft ->
16331633 Internal.element
16341634 Internal.asRow
16351635 (Internal.NodeName "label")
1636− attrs
1636+ (Internal.htmlClass classes.inputLabel :: attrs)
16371637 (Internal.Unkeyed [ labelElement, input ])
16381638
16391639
src/Internal/Style.elm+4
@@ -257,6 +257,7 @@ classes =
257257 , inputMultilineParent = "imlp"
258258 , inputMultilineFiller = "imlf"
259259 , inputMultilineWrapper = "implw"
260+ , inputLabel = "lbl"
260261
261262 -- link
262263 , link = "lnk"
@@ -1358,6 +1359,9 @@ baseSheet =
13581359 , Descriptor (dot classes.spaceEvenly)
13591360 [ Prop "justify-content" "space-between"
13601361 ]
1362+ , Descriptor (dot classes.inputLabel)
1363+ [ Prop "align-items" "baseline"
1364+ ]
13611365 ]
13621366 , Descriptor (dot classes.column)
13631367 [ Prop "display" "flex"