clay-0.15.0: CSS preprocessor as embedded Haskell.

Safe Haskell | None
Language | Haskell2010

Clay.Background

Contents

- Generic background property.
- The background-color.
- The background-position.
- The background-size.
- The background-repeat.
- The background-origin.
- The background-clip.
- The background-attachment.
- The background-image.
- Specifying sides.
- Specifying directions and location.

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

Instances details

Background BackgroundAttachment # |
Instance details Defined in Clay.Background Methods background :: BackgroundAttachment -> Css #
Background BackgroundClip # |
Instance details Defined in Clay.Background Methods background :: BackgroundClip -> Css #
Background BackgroundImage # |
Instance details Defined in Clay.Background Methods background :: BackgroundImage -> Css #
Background BackgroundOrigin # |
Instance details Defined in Clay.Background Methods background :: BackgroundOrigin -> Css #
Background BackgroundPosition # |
Instance details Defined in Clay.Background Methods background :: BackgroundPosition -> Css #
Background BackgroundRepeat # |
Instance details Defined in Clay.Background Methods background :: BackgroundRepeat -> Css #
Background BackgroundSize # |
Instance details Defined in Clay.Background Methods background :: BackgroundSize -> Css #
Background Color # |
Instance details Defined in Clay.Background Methods background :: Color -> Css #
Background a => Background [a] # |
Instance details Defined in Clay.Background Methods background :: [a] -> Css #
(Background a, Background b) => Background (a, b) # |
Instance details Defined in Clay.Background Methods background :: (a, b) -> Css #

# The background-color.

backgroundColor :: Color -> Css #

# The background-position.

data BackgroundPosition #

#### Instances

Instances details

Background BackgroundPosition # |
Instance details Defined in Clay.Background Methods background :: BackgroundPosition -> Css #
Inherit BackgroundPosition # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundPosition #
Other BackgroundPosition # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundPosition #
Mask BackgroundPosition # |
Instance details Defined in Clay.Mask Methods mask :: BackgroundPosition -> Css #
Val BackgroundPosition # |
Instance details Defined in Clay.Background Methods value :: BackgroundPosition -> Value #

backgroundPosition :: BackgroundPosition -> Css #

backgroundPositions :: [BackgroundPosition] -> Css #

placed :: Side -> Side -> BackgroundPosition #

positioned :: Size a -> Size a -> BackgroundPosition #

# The background-size.

data BackgroundSize #

#### Instances

Instances details

Background BackgroundSize # |
Instance details Defined in Clay.Background Methods background :: BackgroundSize -> Css #
Auto BackgroundSize # |
Instance details Defined in Clay.Background Methods auto :: BackgroundSize #
Inherit BackgroundSize # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundSize #
Other BackgroundSize # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundSize #
Mask BackgroundSize # |
Instance details Defined in Clay.Mask Methods mask :: BackgroundSize -> Css #
Val BackgroundSize # |
Instance details Defined in Clay.Background Methods value :: BackgroundSize -> Value #

backgroundSize :: BackgroundSize -> Css #

backgroundSizes :: [BackgroundSize] -> Css #

contain :: BackgroundSize #

cover :: BackgroundSize #

by :: Size a -> Size b -> BackgroundSize #

# The background-repeat.

data BackgroundRepeat #

#### Instances

Instances details

Background BackgroundRepeat # |
Instance details Defined in Clay.Background Methods background :: BackgroundRepeat -> Css #
Inherit BackgroundRepeat # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundRepeat #
None BackgroundRepeat # |
Instance details Defined in Clay.Background Methods none :: BackgroundRepeat #
Other BackgroundRepeat # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundRepeat #
Mask BackgroundRepeat # |
Instance details Defined in Clay.Mask Methods mask :: BackgroundRepeat -> Css #
Val BackgroundRepeat # |
Instance details Defined in Clay.Background Methods value :: BackgroundRepeat -> Value #

backgroundRepeat :: BackgroundRepeat -> Css #

backgroundRepeats :: [BackgroundRepeat] -> Css #

repeat :: BackgroundRepeat #

space :: BackgroundRepeat #

round :: BackgroundRepeat #

noRepeat :: BackgroundRepeat #

xyRepeat :: BackgroundRepeat -> BackgroundRepeat -> BackgroundRepeat #

repeatX :: BackgroundRepeat #

repeatY :: BackgroundRepeat #

# The background-origin.

data BackgroundOrigin #

#### Instances

Instances details

Background BackgroundOrigin # |
Instance details Defined in Clay.Background Methods background :: BackgroundOrigin -> Css #
Inherit BackgroundOrigin # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundOrigin #
Other BackgroundOrigin # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundOrigin #
Mask BackgroundOrigin # |
Instance details Defined in Clay.Mask Methods mask :: BackgroundOrigin -> Css #
Val BackgroundOrigin # |
Instance details Defined in Clay.Background Methods value :: BackgroundOrigin -> Value #

backgroundOrigin :: BackgroundOrigin -> Css #

backgroundOrigins :: [BackgroundOrigin] -> Css #

origin :: BoxType -> BackgroundOrigin #

# The background-clip.

data BackgroundClip #

#### Instances

Instances details

Background BackgroundClip # |
Instance details Defined in Clay.Background Methods background :: BackgroundClip -> Css #
Inherit BackgroundClip # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundClip #
Other BackgroundClip # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundClip #
Mask BackgroundClip # |
Instance details Defined in Clay.Mask Methods mask :: BackgroundClip -> Css #
Val BackgroundClip # |
Instance details Defined in Clay.Background Methods value :: BackgroundClip -> Value #

backgroundClip :: BackgroundClip -> Css #

backgroundClips :: [BackgroundClip] -> Css #

boxClip :: BoxType -> BackgroundClip #

# The background-attachment.

data BackgroundAttachment #

#### Instances

Instances details

Background BackgroundAttachment # |
Instance details Defined in Clay.Background Methods background :: BackgroundAttachment -> Css #
Inherit BackgroundAttachment # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundAttachment #
Other BackgroundAttachment # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundAttachment #
Mask BackgroundAttachment # |
Instance details Defined in Clay.Mask Methods mask :: BackgroundAttachment -> Css #
Val BackgroundAttachment # |
Instance details Defined in Clay.Background Methods value :: BackgroundAttachment -> Value #

backgroundAttachment :: BackgroundAttachment -> Css #

backgroundAttachments :: [BackgroundAttachment] -> Css #

attachFixed :: BackgroundAttachment #

attachScroll :: BackgroundAttachment #

# The background-image.

data BackgroundImage #

#### Instances

Instances details

Background BackgroundImage # |
Instance details Defined in Clay.Background Methods background :: BackgroundImage -> Css #
Inherit BackgroundImage # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundImage #
None BackgroundImage # |
Instance details Defined in Clay.Background Methods none :: BackgroundImage #
Other BackgroundImage # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundImage #
Mask BackgroundImage # |
Instance details Defined in Clay.Mask Methods mask :: BackgroundImage -> Css #
Val BackgroundImage # |
Instance details Defined in Clay.Background Methods value :: BackgroundImage -> Value #

backgroundImage :: BackgroundImage -> Css #

backgroundImages :: [BackgroundImage] -> Css #

url :: Text -> BackgroundImage #

# Specifying sides.

data Side #

#### Instances

Instances details

Loc Side # |
Instance details Defined in Clay.Background Methods location :: Side -> Location #
Inherit Side # |
Instance details Defined in Clay.Background Methods inherit :: Side #
Other Side # |
Instance details Defined in Clay.Background Methods other :: Value -> Side #
Val Side # |
Instance details Defined in Clay.Background Methods value :: Side -> Value #

sideTop :: Side #

We have to prefix these values to avoid conflict with existing property names.

sideLeft :: Side #

We have to prefix these values to avoid conflict with existing property names.

sideRight :: Side #

We have to prefix these values to avoid conflict with existing property names.

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.

data Direction #

#### Instances

Instances details

Other Direction # |
Instance details Defined in Clay.Background Methods other :: Value -> Direction #
Val Direction # |
Instance details Defined in Clay.Background Methods value :: Direction -> Value #

straight :: Side -> Direction #

angular :: Angle a -> Direction #

data Location #

#### Instances

Instances details

Other Location # |
Instance details Defined in Clay.Background Methods other :: Value -> Location #
Val Location # |
Instance details Defined in Clay.Background Methods value :: Location -> Value #

class Val a => Loc a #

#### Instances

Instances details

Loc Side # |
Instance details Defined in Clay.Background Methods location :: Side -> Location #
Loc (Size a) # |
Instance details Defined in Clay.Background Methods location :: Size a -> Location #
(Loc a, Loc b) => Loc (a, b) # |
Instance details Defined in Clay.Background Methods location :: (a, b) -> Location #

class Val a #

Minimal complete definition

value

#### Instances

Instances details

Val AnimationDirection # |
Instance details Defined in Clay.Animation Methods value :: AnimationDirection -> Value #
Val AnimationName # |
Instance details Defined in Clay.Animation Methods value :: AnimationName -> Value #
Val FillMode # |
Instance details Defined in Clay.Animation Methods value :: FillMode -> Value #
Val IterationCount # |
Instance details Defined in Clay.Animation Methods value :: IterationCount -> Value #
Val PlayState # |
Instance details Defined in Clay.Animation Methods value :: PlayState -> Value #
Val BackgroundAttachment # |
Instance details Defined in Clay.Background Methods value :: BackgroundAttachment -> Value #
Val BackgroundClip # |
Instance details Defined in Clay.Background Methods value :: BackgroundClip -> Value #
Val BackgroundImage # |
Instance details Defined in Clay.Background Methods value :: BackgroundImage -> Value #
Val BackgroundOrigin # |
Instance details Defined in Clay.Background Methods value :: BackgroundOrigin -> Value #
Val BackgroundPosition # |
Instance details Defined in Clay.Background Methods value :: BackgroundPosition -> Value #
Val BackgroundRepeat # |
Instance details Defined in Clay.Background Methods value :: BackgroundRepeat -> Value #
Val BackgroundSize # |
Instance details Defined in Clay.Background Methods value :: BackgroundSize -> Value #
Val Direction # |
Instance details Defined in Clay.Background Methods value :: Direction -> Value #
Val Location # |
Instance details Defined in Clay.Background Methods value :: Location -> Value #
Val Side # |
Instance details Defined in Clay.Background Methods value :: Side -> Value #
Val Stroke # |
Instance details Defined in Clay.Border Methods value :: Stroke -> Value #
Val BoxType # |
Instance details Defined in Clay.Box Methods value :: BoxType -> Value #
Val Color # |
Instance details Defined in Clay.Color Methods value :: Color -> Value #
Val Clear # |
Instance details Defined in Clay.Display Methods value :: Clear -> Value #
Val Clip # |
Instance details Defined in Clay.Display Methods value :: Clip -> Value #
Val Display # |
Instance details Defined in Clay.Display Methods value :: Display -> Value #
Val FloatStyle # |
Instance details Defined in Clay.Display Methods value :: FloatStyle -> Value #
Val Overflow # |
Instance details Defined in Clay.Display Methods value :: Overflow -> Value #
Val PointerEvents # |
Instance details Defined in Clay.Display Methods value :: PointerEvents -> Value #
Val Position # |
Instance details Defined in Clay.Display Methods value :: Position -> Value #
Val Visibility # |
Instance details Defined in Clay.Display Methods value :: Visibility -> Value #
Val UserFocus # |
Instance details Defined in Clay.Dynamic Methods value :: UserFocus -> Value #
Val UserInput # |
Instance details Defined in Clay.Dynamic Methods value :: UserInput -> Value #
Val UserModify # |
Instance details Defined in Clay.Dynamic Methods value :: UserModify -> Value #
Val UserSelect # |
Instance details Defined in Clay.Dynamic Methods value :: UserSelect -> Value #
Val Filter # |
Instance details Defined in Clay.Filter Methods value :: Filter -> Value #
Val AlignContentValue # |
Instance details Defined in Clay.Flexbox Methods value :: AlignContentValue -> Value #
Val AlignItemsValue # |
Instance details Defined in Clay.Flexbox Methods value :: AlignItemsValue -> Value #
Val AlignSelfValue # |
Instance details Defined in Clay.Flexbox Methods value :: AlignSelfValue -> Value #
Val FlexDirection # |
Instance details Defined in Clay.Flexbox Methods value :: FlexDirection -> Value #
Val FlexWrap # |
Instance details Defined in Clay.Flexbox Methods value :: FlexWrap -> Value #
Val JustifyContentValue # |
Instance details Defined in Clay.Flexbox Methods value :: JustifyContentValue -> Value #
Val FontSize # |
Instance details Defined in Clay.Font Methods value :: FontSize -> Value #
Val FontStyle # |
Instance details Defined in Clay.Font Methods value :: FontStyle -> Value #
Val FontVariant # |
Instance details Defined in Clay.Font Methods value :: FontVariant -> Value #
Val FontWeight # |
Instance details Defined in Clay.Font Methods value :: FontWeight -> Value #
Val NamedFont # |
Instance details Defined in Clay.Font Methods value :: NamedFont -> Value #
Val Optional # |
Instance details Defined in Clay.Font Methods value :: Optional -> Value #
Val FontFaceSrc # |
Instance details Defined in Clay.FontFace Methods value :: FontFaceSrc -> Value #
Val Extend # |
Instance details Defined in Clay.Gradient Methods value :: Extend -> Value #
Val Radial # |
Instance details Defined in Clay.Gradient Methods value :: Radial -> Value #
Val ListStyleImage # |
Instance details Defined in Clay.List Methods value :: ListStyleImage -> Value #
Val ListStylePosition # |
Instance details Defined in Clay.List Methods value :: ListStylePosition -> Value #
Val ListStyleType # |
Instance details Defined in Clay.List Methods value :: ListStyleType -> Value #
Val MaskComposite # |
Instance details Defined in Clay.Mask Methods value :: MaskComposite -> Value #
Val ColorScheme # |
Instance details Defined in Clay.Media Methods value :: ColorScheme -> Value #
Val Resolution # |
Instance details Defined in Clay.Media Methods value :: Resolution -> Value #
Val Literal # |
Instance details Defined in Clay.Property Methods value :: Literal -> Value #
Val Number # |
Instance details Defined in Clay.Property Methods value :: Number -> Value #
Val Value # |
Instance details Defined in Clay.Property Methods value :: Value -> Value #
Val MediaType # |
Instance details Defined in Clay.Stylesheet Methods value :: MediaType -> Value #
Val Content # |
Instance details Defined in Clay.Text Methods value :: Content -> Value #
Val HyphenateCharacter # |
Instance details Defined in Clay.Text Methods value :: HyphenateCharacter -> Value #
Val HyphenateLimit # |
Instance details Defined in Clay.Text Methods value :: HyphenateLimit -> Value #
Val Hyphens # |
Instance details Defined in Clay.Text Methods value :: Hyphens -> Value #
Val OverflowWrap # |
Instance details Defined in Clay.Text Methods value :: OverflowWrap -> Value #
Val TextAlign # |
Instance details Defined in Clay.Text Methods value :: TextAlign -> Value #
Val TextDecoration # |
Instance details Defined in Clay.Text Methods value :: TextDecoration -> Value #
Val TextDirection # |
Instance details Defined in Clay.Text Methods value :: TextDirection -> Value #
Val TextIndent # |
Instance details Defined in Clay.Text Methods value :: TextIndent -> Value #
Val TextOverflow # |
Instance details Defined in Clay.Text Methods value :: TextOverflow -> Value #
Val TextRendering # |
Instance details Defined in Clay.Text Methods value :: TextRendering -> Value #
Val TextTransform # |
Instance details Defined in Clay.Text Methods value :: TextTransform -> Value #
Val WhiteSpace # |
Instance details Defined in Clay.Text Methods value :: WhiteSpace -> Value #
Val WordBreak # |
Instance details Defined in Clay.Text Methods value :: WordBreak -> Value #
Val Time # |
Instance details Defined in Clay.Time Methods value :: Time -> Value #
Val TransformBox # |
Instance details Defined in Clay.Transform Methods value :: TransformBox -> Value #
Val TransformStyle # |
Instance details Defined in Clay.Transform Methods value :: TransformStyle -> Value #
Val Transformation # |
Instance details Defined in Clay.Transform Methods value :: Transformation -> Value #
Val TimingFunction # |
Instance details Defined in Clay.Transition Methods value :: TimingFunction -> Value #
Val Text # |
Instance details Defined in Clay.Property Methods value :: Text -> Value #
Val Integer # |
Instance details Defined in Clay.Property Methods value :: Integer -> Value #
Val (Required a) # |
Instance details Defined in Clay.Font Methods value :: Required a -> Value #
Val (Angle a) # |
Instance details Defined in Clay.Size Methods value :: Angle a -> Value #
Val (Size a) # |
Instance details Defined in Clay.Size Methods value :: Size a -> Value #
Val a => Val (NonEmpty a) # |
Instance details Defined in Clay.Property Methods value :: NonEmpty a -> Value #
Val a => Val (Maybe a) # |
Instance details Defined in Clay.Property Methods value :: Maybe a -> Value #
Val a => Val [a] # |
Instance details Defined in Clay.Property Methods value :: [a] -> Value #
(Val a, Val b) => Val (Either a b) # |
Instance details Defined in Clay.Property Methods value :: Either a b -> Value #
(Val a, Val b) => Val (a, b) # |
Instance details Defined in Clay.Property Methods value :: (a, b) -> Value #

location :: Loc a => a -> Location #