Skip to content

Commit e37b0ca

Browse files
author
Madeline Trotter
authored
Fix Slat margin in Safari (#113)
1 parent a79d120 commit e37b0ca

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

src/Lumi/Components2/Slat.purs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ slat =
4848
}
4949
Just interaction@{ href: Nothing } ->
5050
E.element R.button'
51-
{ css: toCSS theme props slatStyle
51+
{ css: toCSS theme props slatStyleInteractive
5252
, children: props.content
5353
, onClick: capture_ interaction.onClick
5454
, tabIndex: interaction.tabIndex
5555
, className
5656
}
5757
Just interaction@{ href: Just href } ->
5858
E.element R.a'
59-
{ css: toCSS theme props slatStyle
59+
{ css: toCSS theme props slatStyleInteractive
6060
, children: props.content
6161
, onClick: capture_ interaction.onClick
6262
, tabIndex: interaction.tabIndex
@@ -73,10 +73,13 @@ slat =
7373
Styles.Slat.Hidden.slat
7474
>>> styleModifier_ (E.css { appearance: E.none })
7575

76+
slatStyleInteractive =
77+
slatStyle
78+
>>> Styles.Slat.Hidden._interactive
79+
7680
_interactive :: SlatInteraction -> PropsModifier SlatProps
7781
_interactive interaction =
78-
Styles.Slat.Hidden._interactive
79-
>>> propsModifier
80-
_
81-
{ interaction = Just interaction
82-
}
82+
propsModifier
83+
_
84+
{ interaction = Just interaction
85+
}

src/Lumi/Styles/Box.purs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@ module Lumi.Styles.Box where
33
import Prelude
44
import Color (cssStringHSLA)
55
import Lumi.Components (PropsModifier)
6-
import Lumi.Styles (styleModifier, styleModifier_)
6+
import Lumi.Styles (int, styleModifier, styleModifier_)
77
import Lumi.Styles.Theme (LumiTheme(..))
88
import React.Basic.Emotion (class IsStyleProperty, css, nested, prop, str)
99

1010
box :: forall props. PropsModifier props
1111
box =
1212
styleModifier_
1313
$ css
14-
{ label: str "box"
15-
, display: str "flex"
16-
, flexDirection: str "column"
17-
, boxSizing: str "border-box"
18-
, minHeight: str "0"
19-
, minWidth: str "min-content"
20-
, flex: str "0 0 auto"
21-
}
14+
{ label: str "box"
15+
, display: str "flex"
16+
, flexDirection: str "column"
17+
, boxSizing: str "border-box"
18+
, minHeight: int 0
19+
, minWidth: str "min-content"
20+
, flex: str "0 0 auto"
21+
, margin: int 0
22+
, padding: int 0
23+
}
2224

2325
_row :: forall props. PropsModifier props
2426
_row =

0 commit comments

Comments
 (0)