@@ -38,8 +38,6 @@ import Web.Atomic.Types
3838> el " - " ~ grow
3939> el "Bottom"
4040-}
41-
42-
4341flexCol :: (Styleable h ) => CSS h -> CSS h
4442flexCol =
4543 utility
@@ -48,6 +46,7 @@ flexCol =
4846 , " flex-direction" :. style Column
4947 ]
5048
49+
5150{- | Lay out children in a row. See 'Web.Atomic.Html.Tag.row'
5251
5352> el ~ flexRow $ do
@@ -64,8 +63,6 @@ flexRow =
6463 ]
6564
6665
67-
68-
6966-- | Grow to fill the available space in the parent 'flexRow' or 'flexCol'
7067grow :: (Styleable h ) => CSS h -> CSS h
7168grow = utility " grow" [" flex-grow" :. " 1" ]
@@ -226,21 +223,22 @@ data Visibility
226223 deriving (Show , ToClassName , ToStyle )
227224
228225
229- visibility :: Styleable h => Visibility -> CSS h -> CSS h
226+ visibility :: ( Styleable h ) => Visibility -> CSS h -> CSS h
230227visibility v = utility (" vis" -. v) [" visibility" :. style v]
231228
229+
232230{- | Set to specific width
233231
234232> el ~ width 100 $ "100px"
235233> el ~ width (PxRem 100) $ "100px"
236234> el ~ width (Pct 50) $ "50pct"
237235-}
238236width :: (Styleable h ) => Length -> CSS h -> CSS h
239- width n = utility (" w" -. n) [ " width" :. style n ]
237+ width n = utility (" w" -. n) [" width" :. style n]
240238
241239
242240height :: (Styleable h ) => Length -> CSS h -> CSS h
243- height n = utility (" h" -. n) [ " height" :. style n ]
241+ height n = utility (" h" -. n) [" height" :. style n]
244242
245243
246244-- | Allow width to grow to contents but not shrink any smaller than value
@@ -249,12 +247,22 @@ minWidth n =
249247 utility (" mw" -. n) [" min-width" :. style n]
250248
251249
250+ maxWidth :: (Styleable h ) => Length -> CSS h -> CSS h
251+ maxWidth n =
252+ utility (" mxw" -. n) [" max-width" :. style n]
253+
254+
252255-- | Allow height to grow to contents but not shrink any smaller than value
253256minHeight :: (Styleable h ) => Length -> CSS h -> CSS h
254257minHeight n =
255258 utility (" mh" -. n) [" min-height" :. style n]
256259
257260
261+ maxHeight :: (Styleable h ) => Length -> CSS h -> CSS h
262+ maxHeight n =
263+ utility (" mxh" -. n) [" max-height" :. style n]
264+
265+
258266data Overflow
259267 = Scroll
260268 | Clip
@@ -264,6 +272,6 @@ instance PropertyStyle Overflow Auto
264272instance PropertyStyle Overflow Visibility
265273
266274
267- -- | Control how an element clips content that exceeds its bounds
275+ -- | Control how an element clips content that exceeds its bounds
268276overflow :: (PropertyStyle Overflow o , ToClassName o , Styleable h ) => o -> CSS h -> CSS h
269277overflow o = utility (" over" -. o) [" overflow" :. propertyStyle @ Overflow o]
0 commit comments