Safe Haskell | None |
---|---|
Language | Haskell2010 |
Clay.Background
Synopsis
- class Val a => Background a where
- background :: a -> Css
- 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
- 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.
Minimal complete definition
Nothing
Methods
background :: a -> Css #
Instances
The background-color.
backgroundColor :: Color -> Css #
The background-position.
data BackgroundPosition #
Instances
Background BackgroundPosition # | |
Defined in Clay.Background Methods background :: BackgroundPosition -> Css # | |
Inherit BackgroundPosition # | |
Defined in Clay.Background Methods | |
Other BackgroundPosition # | |
Defined in Clay.Background Methods other :: Value -> BackgroundPosition # | |
Mask BackgroundPosition # | |
Defined in Clay.Mask Methods mask :: BackgroundPosition -> Css # | |
Val BackgroundPosition # | |
Defined in Clay.Background Methods value :: BackgroundPosition -> Value # |
backgroundPositions :: [BackgroundPosition] -> Css #
placed :: Side -> Side -> BackgroundPosition #
positioned :: Size a -> Size a -> BackgroundPosition #
The background-size.
data BackgroundSize #
Instances
Background BackgroundSize # | |
Defined in Clay.Background Methods background :: BackgroundSize -> Css # | |
Auto BackgroundSize # | |
Defined in Clay.Background Methods auto :: BackgroundSize # | |
Inherit BackgroundSize # | |
Defined in Clay.Background Methods | |
Other BackgroundSize # | |
Defined in Clay.Background Methods other :: Value -> BackgroundSize # | |
Mask BackgroundSize # | |
Defined in Clay.Mask Methods mask :: BackgroundSize -> Css # | |
Val BackgroundSize # | |
Defined in Clay.Background Methods value :: BackgroundSize -> Value # |
backgroundSize :: BackgroundSize -> Css #
backgroundSizes :: [BackgroundSize] -> Css #
cover :: BackgroundSize #
by :: Size a -> Size b -> BackgroundSize #
The background-repeat.
data BackgroundRepeat #
Instances
Background BackgroundRepeat # | |
Defined in Clay.Background Methods background :: BackgroundRepeat -> Css # | |
Inherit BackgroundRepeat # | |
Defined in Clay.Background Methods | |
None BackgroundRepeat # | |
Defined in Clay.Background Methods | |
Other BackgroundRepeat # | |
Defined in Clay.Background Methods other :: Value -> BackgroundRepeat # | |
Mask BackgroundRepeat # | |
Defined in Clay.Mask Methods mask :: BackgroundRepeat -> Css # | |
Val BackgroundRepeat # | |
Defined in Clay.Background Methods value :: BackgroundRepeat -> Value # |
backgroundRepeat :: BackgroundRepeat -> Css #
backgroundRepeats :: [BackgroundRepeat] -> Css #
The background-origin.
data BackgroundOrigin #
Instances
Background BackgroundOrigin # | |
Defined in Clay.Background Methods background :: BackgroundOrigin -> Css # | |
Inherit BackgroundOrigin # | |
Defined in Clay.Background Methods | |
Other BackgroundOrigin # | |
Defined in Clay.Background Methods other :: Value -> BackgroundOrigin # | |
Mask BackgroundOrigin # | |
Defined in Clay.Mask Methods mask :: BackgroundOrigin -> Css # | |
Val BackgroundOrigin # | |
Defined in Clay.Background Methods value :: BackgroundOrigin -> Value # |
backgroundOrigin :: BackgroundOrigin -> Css #
backgroundOrigins :: [BackgroundOrigin] -> Css #
origin :: BoxType -> BackgroundOrigin #
The background-clip.
data BackgroundClip #
Instances
Background BackgroundClip # | |
Defined in Clay.Background Methods background :: BackgroundClip -> Css # | |
Inherit BackgroundClip # | |
Defined in Clay.Background Methods | |
Other BackgroundClip # | |
Defined in Clay.Background Methods other :: Value -> BackgroundClip # | |
Mask BackgroundClip # | |
Defined in Clay.Mask Methods mask :: BackgroundClip -> Css # | |
Val BackgroundClip # | |
Defined in Clay.Background Methods value :: BackgroundClip -> Value # |
backgroundClip :: BackgroundClip -> Css #
backgroundClips :: [BackgroundClip] -> Css #
boxClip :: BoxType -> BackgroundClip #
The background-attachment.
data BackgroundAttachment #
Instances
Background BackgroundAttachment # | |
Defined in Clay.Background Methods background :: BackgroundAttachment -> Css # | |
Inherit BackgroundAttachment # | |
Defined in Clay.Background Methods | |
Other BackgroundAttachment # | |
Defined in Clay.Background Methods other :: Value -> BackgroundAttachment # | |
Mask BackgroundAttachment # | |
Defined in Clay.Mask Methods mask :: BackgroundAttachment -> Css # | |
Val BackgroundAttachment # | |
Defined in Clay.Background Methods value :: BackgroundAttachment -> Value # |
The background-image.
data BackgroundImage #
Instances
Background BackgroundImage # | |
Defined in Clay.Background Methods background :: BackgroundImage -> Css # | |
Inherit BackgroundImage # | |
Defined in Clay.Background Methods | |
None BackgroundImage # | |
Defined in Clay.Background Methods none :: BackgroundImage # | |
Other BackgroundImage # | |
Defined in Clay.Background Methods other :: Value -> BackgroundImage # | |
Mask BackgroundImage # | |
Defined in Clay.Mask Methods mask :: BackgroundImage -> Css # | |
Val BackgroundImage # | |
Defined in Clay.Background Methods value :: BackgroundImage -> Value # |
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