-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Flexbox layouts for Threepenny-gui.
--   
--   Flexbox layouts for Threepenny-gui.
@package threepenny-gui-flexbox
@version 0.4.2

module Graphics.UI.Threepenny.Ext.Flexbox

-- | Properties for a parent.
data ParentProps
ParentProps :: Display -> FlexDirection -> FlexWrap -> JustifyContentValue -> AlignItemsValue -> AlignContentValue -> ParentProps
[pDisplay] :: ParentProps -> Display
[pFlexDirection] :: ParentProps -> FlexDirection
[pFlexWrap] :: ParentProps -> FlexWrap
[pJustifyContent] :: ParentProps -> JustifyContentValue
[pAlignItems] :: ParentProps -> AlignItemsValue
[pAlignContent] :: ParentProps -> AlignContentValue

-- | Default properties for a parent.
parentProps :: ParentProps
display :: Display -> ParentProps
flexDirection :: FlexDirection -> ParentProps
flexWrap :: FlexWrap -> ParentProps
justifyContent :: JustifyContentValue -> ParentProps
alignItems :: AlignItemsValue -> ParentProps
aligContent :: AlignContentValue -> ParentProps

-- | Properties for a child.
data ChildProps
ChildProps :: Int -> Int -> Int -> Size LengthUnit -> AlignSelfValue -> ChildProps
[cOrder] :: ChildProps -> Int
[cFlexGrow] :: ChildProps -> Int
[cFlexShrink] :: ChildProps -> Int
[cFlexBasis] :: ChildProps -> Size LengthUnit
[cAlignSelf] :: ChildProps -> AlignSelfValue

-- | Default properties for a child.
childProps :: ChildProps
order :: Int -> ChildProps
flexGrow :: Int -> ChildProps
flexShrink :: Int -> ChildProps
flexBasis :: Size LengthUnit -> ChildProps
alignSelf :: AlignSelfValue -> ChildProps

-- | Convert to Threepenny style.
class ToStyle a
toStyle :: ToStyle a => a -> [(String, String)]

-- | Set Flexbox properties on an element.
setFlex :: ToStyle a => a -> UI Element -> UI Element

-- | Attach elements to a parent element, applying given Flexbox
--   properties.
flex :: UI Element -> ParentProps -> [(UI Element, ChildProps)] -> UI Element

-- | Like <a>flex</a> but apply default properties to the parent.
flex_p :: UI Element -> [(UI Element, ChildProps)] -> UI Element

-- | Like <a>flex</a> but apply default properties to the children.
flex_c :: UI Element -> ParentProps -> [UI Element] -> UI Element

-- | Like <a>flex</a> but apply default properties to the parent and
--   children.
flex_pc :: UI Element -> [UI Element] -> UI Element
instance Graphics.UI.Threepenny.Ext.Flexbox.ToStyle Graphics.UI.Threepenny.Ext.Flexbox.ChildProps
instance Graphics.UI.Threepenny.Ext.Flexbox.ToStyle Graphics.UI.Threepenny.Ext.Flexbox.ParentProps
instance Graphics.UI.Threepenny.Ext.Flexbox.ToStyle Clay.Stylesheet.Rule
