clay-0.15.0: CSS preprocessor as embedded Haskell.

Safe Haskell | None
Language | Haskell2010

Clay.Property

Synopsis

- data Prefixed
  - = Prefixed {
    - unPrefixed :: [(Text, Text)]
    }
  - | Plain {
    - unPlain :: Text
    }
- merge :: Prefixed -> Prefixed -> Prefixed
- plain :: Prefixed -> Text
- quote :: Text -> Text
- newtype Key a = Key {
  - unKeys :: Prefixed
  }
- cast :: Key a -> Key ()
- newtype Value = Value {
  - unValue :: Prefixed
  }
- class Val a where
  - value :: a -> Value
- newtype Literal = Literal Text
- data E5 = E5
- intercalate :: Monoid a => a -> [a] -> a
- newtype Number = Number {
  - unNumber :: Fixed E5
  }
- cssNumberText :: Number -> Text
- noCommas :: Val a => [a] -> Value
- (!) :: a -> b -> (a, b)

# Documentation

data Prefixed #

Constructors

Prefixed |
Fields unPrefixed :: [(Text, Text)]
Plain |
Fields unPlain :: Text

#### Instances

Instances details

IsString Prefixed # |
Instance details Defined in Clay.Property Methods fromString :: String -> Prefixed #
Monoid Prefixed # |
Instance details Defined in Clay.Property Methods mempty :: Prefixed # mappend :: Prefixed -> Prefixed -> Prefixed # mconcat :: [Prefixed] -> Prefixed #
Semigroup Prefixed # |
Instance details Defined in Clay.Property Methods (<>) :: Prefixed -> Prefixed -> Prefixed # sconcat :: NonEmpty Prefixed -> Prefixed # stimes :: Integral b => b -> Prefixed -> Prefixed #
Show Prefixed # |
Instance details Defined in Clay.Property Methods showsPrec :: Int -> Prefixed -> ShowS # show :: Prefixed -> String # showList :: [Prefixed] -> ShowS #
Eq Prefixed # |
Instance details Defined in Clay.Property Methods (==) :: Prefixed -> Prefixed -> Bool # (/=) :: Prefixed -> Prefixed -> Bool #

merge :: Prefixed -> Prefixed -> Prefixed #

plain :: Prefixed -> Text #

quote :: Text -> Text #

newtype Key a #

Constructors

Key |
Fields unKeys :: Prefixed

#### Instances

Instances details

IsString (Key a) # |
Instance details Defined in Clay.Property Methods fromString :: String -> Key a #
Monoid (Key a) # |
Instance details Defined in Clay.Property Methods mempty :: Key a # mappend :: Key a -> Key a -> Key a # mconcat :: [Key a] -> Key a #
Semigroup (Key a) # |
Instance details Defined in Clay.Property Methods (<>) :: Key a -> Key a -> Key a # sconcat :: NonEmpty (Key a) -> Key a # stimes :: Integral b => b -> Key a -> Key a #
Show (Key a) # |
Instance details Defined in Clay.Property Methods showsPrec :: Int -> Key a -> ShowS # show :: Key a -> String # showList :: [Key a] -> ShowS #

cast :: Key a -> Key () #

newtype Value #

Constructors

Value |
Fields unValue :: Prefixed

#### Instances

Instances details

IsString Value # |
Instance details Defined in Clay.Property Methods fromString :: String -> Value #
Monoid Value # |
Instance details Defined in Clay.Property Methods mempty :: Value # mappend :: Value -> Value -> Value # mconcat :: [Value] -> Value #
Semigroup Value # |
Instance details Defined in Clay.Property Methods (<>) :: Value -> Value -> Value # sconcat :: NonEmpty Value -> Value # stimes :: Integral b => b -> Value -> Value #
Show Value # |
Instance details Defined in Clay.Property Methods showsPrec :: Int -> Value -> ShowS # show :: Value -> String # showList :: [Value] -> ShowS #
All Value # |
Instance details Defined in Clay.Common Methods all :: Value #
Auto Value # |
Instance details Defined in Clay.Common Methods auto :: Value #
Baseline Value # |
Instance details Defined in Clay.Common Methods baseline :: Value #
Center Value # |
Instance details Defined in Clay.Common Methods center :: Value #
Hidden Value # |
Instance details Defined in Clay.Common Methods hidden :: Value #
Inherit Value # |
Instance details Defined in Clay.Common Methods inherit :: Value #
Initial Value # |
Instance details Defined in Clay.Common Methods initial :: Value #
None Value # |
Instance details Defined in Clay.Common Methods none :: Value #
Normal Value # |
Instance details Defined in Clay.Common Methods normal :: Value #
Other Value # |
Instance details Defined in Clay.Common Methods other :: Value -> Value #
Unset Value # |
Instance details Defined in Clay.Common Methods unset :: Value #
Visible Value # |
Instance details Defined in Clay.Common Methods visible :: Value #
FlexEnd Value # |
Instance details Defined in Clay.Flexbox Methods flexEnd :: Value #
FlexStart Value # |
Instance details Defined in Clay.Flexbox Methods flexStart :: Value #
SpaceAround Value # |
Instance details Defined in Clay.Flexbox Methods spaceAround :: Value #
SpaceBetween Value # |
Instance details Defined in Clay.Flexbox Methods spaceBetween :: Value #
SpaceEvenly Value # |
Instance details Defined in Clay.Flexbox Methods spaceEvenly :: Value #
Stretch Value # |
Instance details Defined in Clay.Flexbox Methods stretch :: Value #
Val Value # |
Instance details Defined in Clay.Property Methods value :: Value -> Value #
Eq Value # |
Instance details Defined in Clay.Property Methods (==) :: Value -> Value -> Bool # (/=) :: Value -> Value -> Bool #

class Val a where #

Methods

value :: a -> 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 a => Val (NonEmpty a) # |
Instance details Defined in Clay.Property Methods value :: NonEmpty a -> 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 (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 #

newtype Literal #

Constructors

Literal Text |

#### Instances

Instances details

IsString Literal # |
Instance details Defined in Clay.Property Methods fromString :: String -> Literal #
Monoid Literal # |
Instance details Defined in Clay.Property Methods mempty :: Literal # mappend :: Literal -> Literal -> Literal # mconcat :: [Literal] -> Literal #
Semigroup Literal # |
Instance details Defined in Clay.Property Methods (<>) :: Literal -> Literal -> Literal # sconcat :: NonEmpty Literal -> Literal # stimes :: Integral b => b -> Literal -> Literal #
Show Literal # |
Instance details Defined in Clay.Property Methods showsPrec :: Int -> Literal -> ShowS # show :: Literal -> String # showList :: [Literal] -> ShowS #
Val Literal # |
Instance details Defined in Clay.Property Methods value :: Literal -> Value #

data E5 #

Constructors

E5 |

#### Instances

Instances details

HasResolution E5 # |
Instance details Defined in Clay.Property Methods resolution :: p E5 -> Integer #

intercalate :: Monoid a => a -> [a] -> a #

newtype Number #

A number type to represent the CSS `number` type. It has fixed precision, supporting up to 5 decimal places.

Constructors

Number |
Fields unNumber :: Fixed E5

#### Instances

Instances details

Enum Number # |
Instance details Defined in Clay.Property Methods succ :: Number -> Number # pred :: Number -> Number # toEnum :: Int -> Number # fromEnum :: Number -> Int # enumFrom :: Number -> [Number] # enumFromThen :: Number -> Number -> [Number] # enumFromTo :: Number -> Number -> [Number] # enumFromThenTo :: Number -> Number -> Number -> [Number] #
Num Number # |
Instance details Defined in Clay.Property Methods (+) :: Number -> Number -> Number # (-) :: Number -> Number -> Number # (*) :: Number -> Number -> Number # negate :: Number -> Number # abs :: Number -> Number # signum :: Number -> Number # fromInteger :: Integer -> Number #
Read Number # |
Instance details Defined in Clay.Property Methods readsPrec :: Int -> ReadS Number # readList :: ReadS [Number] # readPrec :: ReadPrec Number # readListPrec :: ReadPrec [Number] #
Fractional Number # |
Instance details Defined in Clay.Property Methods (/) :: Number -> Number -> Number # recip :: Number -> Number # fromRational :: Rational -> Number #
Real Number # |
Instance details Defined in Clay.Property Methods toRational :: Number -> Rational #
RealFrac Number # |
Instance details Defined in Clay.Property Methods properFraction :: Integral b => Number -> (b, Number) # truncate :: Integral b => Number -> b # round :: Integral b => Number -> b # ceiling :: Integral b => Number -> b # floor :: Integral b => Number -> b #
Show Number # |
Instance details Defined in Clay.Property Methods showsPrec :: Int -> Number -> ShowS # show :: Number -> String # showList :: [Number] -> ShowS #
Val Number # |
Instance details Defined in Clay.Property Methods value :: Number -> Value #
Eq Number # |
Instance details Defined in Clay.Property Methods (==) :: Number -> Number -> Bool # (/=) :: Number -> Number -> Bool #
Ord Number # |
Instance details Defined in Clay.Property Methods compare :: Number -> Number -> Ordering # (<) :: Number -> Number -> Bool # (<=) :: Number -> Number -> Bool # (>) :: Number -> Number -> Bool # (>=) :: Number -> Number -> Bool # max :: Number -> Number -> Number # min :: Number -> Number -> Number #

cssNumberText :: Number -> Text #

noCommas :: Val a => [a] -> Value #

(!) :: a -> b -> (a, b) infixr 9 #