Skip to content

Commit 041e7aa

Browse files
authored
[#192] Default fixes (#198)
* Box min-width: auto * Button loading, remove position: absolute, use display: block
1 parent e6d9cdf commit 041e7aa

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/Lumi/Components2/Button.purs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import Lumi.Components (LumiComponent, PropsModifier, lumiComponent, propsModifi
3434
import Lumi.Components.Color (ColorMap, shade)
3535
import Lumi.Components.Size (Size(..))
3636
import Lumi.Components2.Box as Box
37-
import Lumi.Styles (StyleModifier, StyleProperty, absolute, color, css, default, ellipsis, hidden, inherit, inlineFlex, merge, nested, none, nowrap, pointer, px, px2, solid, str, style, style_, toCSS, underline, var)
37+
import Lumi.Styles (StyleModifier, StyleProperty, block, color, css, default, ellipsis, hidden, inherit, inlineFlex, merge, nested, none, nowrap, pointer, px, px2, solid, str, style, style_, toCSS, underline, var)
3838
import Lumi.Styles.Box (FlexAlign(..), _align, _focusable, _interactive, _justify, _row, box)
3939
import Lumi.Styles.Loader (mkLoader)
4040
import Lumi.Styles.Theme (LumiTheme(..), useTheme)
@@ -173,17 +173,21 @@ button = primary >>>
173173
, "&[data-loading]":
174174
nested
175175
$ css
176-
{ "&:after":
176+
{ display: block
177+
, "&:after":
177178
nested
178179
$ merge
179-
[ css { position: absolute }
180-
, mkLoader
180+
[ mkLoader
181181
{ color: var "--button-hue-loader"
182182
, radius: px 16
183183
, borderWidth: px 2
184184
}
185185
]
186-
, "> .button-content": nested $ css { visibility: hidden }
186+
, "> .button-content":
187+
nested
188+
$ css
189+
{ visibility: hidden
190+
}
187191
}
188192
}
189193

src/Lumi/Styles/Box.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Lumi.Styles.Box where
33
import Prelude
44

55
import Color (cssStringHSLA)
6-
import Lumi.Styles (StyleModifier, baseline, borderBox, center, column, flex, flexEnd, flexStart, manipulation, minContent, none, pointer, px, row, spaceAround, spaceBetween, spaceEvenly, stretch, style, style_, wrap)
6+
import Lumi.Styles (StyleModifier, auto, baseline, borderBox, center, column, flex, flexEnd, flexStart, manipulation, minContent, none, pointer, px, row, spaceAround, spaceBetween, spaceEvenly, stretch, style, style_, wrap)
77
import Lumi.Styles.Theme (LumiTheme(..))
88
import React.Basic.Emotion (class IsStyleProperty, css, nested, prop, str)
99

@@ -16,7 +16,7 @@ box =
1616
, flexDirection: column
1717
, boxSizing: borderBox
1818
, minHeight: px 0
19-
, minWidth: minContent
19+
, minWidth: auto
2020
, flex: str "0 0 auto"
2121
, margin: px 0
2222
, padding: px 0

0 commit comments

Comments
 (0)