Safe Haskell | None |
---|---|
Language | Haskell98 |
Clay.Background
Contents
- class Val a => Background a where
- backgroundColor :: Color -> Css
- data BackgroundPosition
- backgroundPosition :: BackgroundPosition -> Css
- backgroundPositions :: [BackgroundPosition] -> Css
- placed :: Side -> Side -> BackgroundPosition
- positioned :: Size a -> Size a -> BackgroundPosition
- data BackgroundSize
- backgroundSize :: BackgroundSize -> Css
- backgroundSizes :: [BackgroundSize] -> Css
- contain :: BackgroundSize
- cover :: BackgroundSize
- by :: Size a -> Size b -> BackgroundSize
- data BackgroundRepeat
- backgroundRepeat :: BackgroundRepeat -> Css
- backgroundRepeats :: [BackgroundRepeat] -> Css
- repeat :: BackgroundRepeat
- space :: BackgroundRepeat
- round :: BackgroundRepeat
- noRepeat :: BackgroundRepeat
- xyRepeat :: BackgroundRepeat -> BackgroundRepeat -> BackgroundRepeat
- repeatX :: BackgroundRepeat
- repeatY :: BackgroundRepeat
- data BackgroundOrigin
- backgroundOrigin :: BackgroundOrigin -> Css
- backgroundOrigins :: [BackgroundOrigin] -> Css
- origin :: BoxType -> BackgroundOrigin
- data BackgroundClip
- backgroundClip :: BackgroundClip -> Css
- backgroundClips :: [BackgroundClip] -> Css
- boxClip :: BoxType -> BackgroundClip
- data BackgroundAttachment
- backgroundAttachment :: BackgroundAttachment -> Css
- backgroundAttachments :: [BackgroundAttachment] -> Css
- attachFixed :: BackgroundAttachment
- attachScroll :: BackgroundAttachment
- data BackgroundImage
- backgroundImage :: BackgroundImage -> Css
- backgroundImages :: [BackgroundImage] -> Css
- url :: Text -> BackgroundImage
- data Side
- sideTop :: Side
- sideLeft :: Side
- sideRight :: Side
- sideBottom :: Side
- sideCenter :: Side
- sideMiddle :: Side
- data Direction
- straight :: Side -> Direction
- angular :: Angle a -> Direction
- data Location
- class Val a => Loc a where
- class Val a
- location :: Loc a => a -> Location
Generic background property.
class Val a => Background a where #
We implement the generic background property as a type class that accepts multiple value types. This allows us to combine different background aspects into a shorthand syntax.
Methods
background :: a -> Css #
Instances
The background-color.
backgroundColor :: Color -> Css #
The background-position.
data BackgroundPosition #
backgroundPositions :: [BackgroundPosition] -> Css #
placed :: Side -> Side -> BackgroundPosition #
positioned :: Size a -> Size a -> BackgroundPosition #
The background-size.
data BackgroundSize #
backgroundSize :: BackgroundSize -> Css #
backgroundSizes :: [BackgroundSize] -> Css #
cover :: BackgroundSize #
by :: Size a -> Size b -> BackgroundSize #
The background-repeat.
data BackgroundRepeat #
backgroundRepeat :: BackgroundRepeat -> Css #
backgroundRepeats :: [BackgroundRepeat] -> Css #
The background-origin.
data BackgroundOrigin #
backgroundOrigin :: BackgroundOrigin -> Css #
backgroundOrigins :: [BackgroundOrigin] -> Css #
origin :: BoxType -> BackgroundOrigin #
The background-clip.
data BackgroundClip #
backgroundClip :: BackgroundClip -> Css #
backgroundClips :: [BackgroundClip] -> Css #
boxClip :: BoxType -> BackgroundClip #
The background-attachment.
data BackgroundAttachment #
The background-image.
data BackgroundImage #
backgroundImage :: BackgroundImage -> Css #
backgroundImages :: [BackgroundImage] -> Css #
url :: Text -> BackgroundImage #
Specifying sides.
sideBottom :: Side #
We have to prefix these values to avoid conflict with existing property names.
sideCenter :: Side #
We have to prefix these values to avoid conflict with existing property names.
sideMiddle :: Side #
We have to prefix these values to avoid conflict with existing property names.
Specifying directions and location.
Minimal complete definition
Instances