Copyright | (c) 2023 Sean Hess |
---|---|
License | BSD3 |
Maintainer | Sean Hess <seanhess@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | GHC2021 |
Web.Atomic.CSS.Layout
Description
Synopsis
- flexCol :: Styleable h => CSS h -> CSS h
- flexRow :: Styleable h => CSS h -> CSS h
- grow :: Styleable h => CSS h -> CSS h
- stack :: Styleable h => CSS h -> CSS h
- popup :: Styleable h => Sides Length -> CSS h -> CSS h
- inset :: Styleable h => Sides Length -> CSS h -> CSS h
- top :: Styleable h => Length -> CSS h -> CSS h
- bottom :: Styleable h => Length -> CSS h -> CSS h
- right :: Styleable h => Length -> CSS h -> CSS h
- left :: Styleable h => Length -> CSS h -> CSS h
- data FlexDirection
- flexDirection :: Styleable h => FlexDirection -> CSS h -> CSS h
- data FlexWrap = WrapReverse
- flexWrap :: (PropertyStyle FlexWrap w, ToClassName w, Styleable h) => w -> CSS h -> CSS h
- position :: Styleable h => Position -> CSS h -> CSS h
- data Position
- zIndex :: Styleable h => Int -> CSS h -> CSS h
- display :: (PropertyStyle Display d, ToClassName d, Styleable h) => d -> CSS h -> CSS h
- data Display
- data Visibility
- visibility :: Styleable h => Visibility -> CSS h -> CSS h
- width :: Styleable h => Length -> CSS h -> CSS h
- height :: Styleable h => Length -> CSS h -> CSS h
- minWidth :: Styleable h => Length -> CSS h -> CSS h
- minHeight :: Styleable h => Length -> CSS h -> CSS h
- data Overflow
- overflow :: (PropertyStyle Overflow o, ToClassName o, Styleable h) => o -> CSS h -> CSS h
Documentation
flexCol :: Styleable h => CSS h -> CSS h Source #
Lay out children in a column. See col
el ~ flexCol $ do el "Top" el " - " ~ grow el "Bottom"
flexRow :: Styleable h => CSS h -> CSS h Source #
Lay out children in a row. See row
el ~ flexRow $ do el "Left" el " - " ~ grow el "Right"
stack :: Styleable h => CSS h -> CSS h Source #
Stack children on top of each other as layers. Each layer has the full width. See popup
el ~ stack $ do el "Background" el ~ bg Black . opacity 0.5 $ "Overlay"
popup :: Styleable h => Sides Length -> CSS h -> CSS h Source #
Place an element above others, out of the flow of the page
el ~ stack $ do input @ value "Autocomplete Box" el ~ popup (TL 10 10) $ do el "Item 1" el "Item 2" el "Item 3" el "This would be covered by the menu"
data FlexDirection Source #
Instances
ToClassName FlexDirection Source # | |
Defined in Web.Atomic.CSS.Layout Methods toClassName :: FlexDirection -> ClassName Source # | |
ToStyle FlexDirection Source # | |
Defined in Web.Atomic.CSS.Layout Methods style :: FlexDirection -> Style Source # | |
Show FlexDirection Source # | |
Defined in Web.Atomic.CSS.Layout Methods showsPrec :: Int -> FlexDirection -> ShowS # show :: FlexDirection -> String # showList :: [FlexDirection] -> ShowS # |
flexDirection :: Styleable h => FlexDirection -> CSS h -> CSS h Source #
Constructors
WrapReverse |
Instances
ToClassName FlexWrap Source # | |
Defined in Web.Atomic.CSS.Layout Methods toClassName :: FlexWrap -> ClassName Source # | |
ToStyle FlexWrap Source # | |
Show FlexWrap Source # | |
PropertyStyle FlexWrap FlexWrap Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: FlexWrap -> Style Source # | |
PropertyStyle FlexWrap Wrap Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: Wrap -> Style Source # |
flexWrap :: (PropertyStyle FlexWrap w, ToClassName w, Styleable h) => w -> CSS h -> CSS h Source #
Set the flex-wrap
el ~ flexWrapWrapReverse
$ do el "one" el "two" el "three" el ~ flexWrapWrap
$ do el "one" el "two" el "three"
display :: (PropertyStyle Display d, ToClassName d, Styleable h) => d -> CSS h -> CSS h Source #
Instances
ToClassName Display Source # | |
Defined in Web.Atomic.CSS.Layout Methods toClassName :: Display -> ClassName Source # | |
ToStyle Display Source # | |
Show Display Source # | |
PropertyStyle Display Display Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: Display -> Style Source # | |
PropertyStyle Display None Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: None -> Style Source # |
data Visibility Source #
Instances
ToClassName Visibility Source # | |
Defined in Web.Atomic.CSS.Layout Methods toClassName :: Visibility -> ClassName Source # | |
ToStyle Visibility Source # | |
Defined in Web.Atomic.CSS.Layout Methods style :: Visibility -> Style Source # | |
Show Visibility Source # | |
Defined in Web.Atomic.CSS.Layout Methods showsPrec :: Int -> Visibility -> ShowS # show :: Visibility -> String # showList :: [Visibility] -> ShowS # | |
PropertyStyle Overflow Visibility Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: Visibility -> Style Source # |
visibility :: Styleable h => Visibility -> CSS h -> CSS h Source #
width :: Styleable h => Length -> CSS h -> CSS h Source #
Set to specific width
el ~ width 100 $ "100px" el ~ width (PxRem 100) $ "100px" el ~ width (Pct 50) $ "50pct"
minWidth :: Styleable h => Length -> CSS h -> CSS h Source #
Allow width to grow to contents but not shrink any smaller than value
minHeight :: Styleable h => Length -> CSS h -> CSS h Source #
Allow height to grow to contents but not shrink any smaller than value
Instances
ToClassName Overflow Source # | |
Defined in Web.Atomic.CSS.Layout Methods toClassName :: Overflow -> ClassName Source # | |
ToStyle Overflow Source # | |
Show Overflow Source # | |
PropertyStyle Overflow Overflow Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: Overflow -> Style Source # | |
PropertyStyle Overflow Visibility Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: Visibility -> Style Source # | |
PropertyStyle Overflow Auto Source # | |
Defined in Web.Atomic.CSS.Layout Methods propertyStyle :: Auto -> Style Source # |
overflow :: (PropertyStyle Overflow o, ToClassName o, Styleable h) => o -> CSS h -> CSS h Source #
Control how an element clips content that exceeds its bounds