clay-0.15.0: CSS preprocessor as embedded Haskell.

Safe Haskell | None
Language | Haskell2010

Clay.Common

Description

A bunch of type classes representing common values shared between multiple CSS properties, like `Auto`, `Inherit`, `None`, `Normal` and several more.

All the common value type classes have an instance for the Value type, making them easily derivable for custom value types.

Synopsis

- class All a where
  - all :: a
- class Auto a where
  - auto :: a
- class Baseline a where
  - baseline :: a
- class Center a where
  - center :: a
- class Inherit a where
  - inherit :: a
- class None a where
  - none :: a
- class Normal a where
  - normal :: a
- class Visible a where
  - visible :: a
- class Hidden a where
  - hidden :: a
- class Initial a where
  - initial :: a
- class Unset a where
  - unset :: a
- class Other a where
  - other :: Value -> a
- allValue :: Value
- autoValue :: Value
- baselineValue :: Value
- centerValue :: Value
- inheritValue :: Value
- normalValue :: Value
- noneValue :: Value
- visibleValue :: Value
- hiddenValue :: Value
- initialValue :: Value
- unsetValue :: Value
- webkitPrefix :: (Text, Text)
- emptyPrefix :: (Text, Text)
- webkit :: Prefixed
- browsers :: Prefixed
- call :: (IsString s, Monoid s) => s -> s -> s
- fracMod :: RealFrac a => a -> a -> a
- decimalRound :: RealFrac a => a -> Int -> a

# Documentation

class All a where #

Methods

all :: a #

#### Instances

Instances details

All UserSelect # |
Instance details Defined in Clay.Dynamic Methods all :: UserSelect #
All Value # |
Instance details Defined in Clay.Common Methods all :: Value #
All MediaType # |
Instance details Defined in Clay.Stylesheet Methods all :: MediaType #

class Auto a where #

Methods

auto :: a #

#### Instances

Instances details

Auto BackgroundSize # |
Instance details Defined in Clay.Background Methods auto :: BackgroundSize #
Auto Stroke # |
Instance details Defined in Clay.Border Methods auto :: Stroke #
Auto Color # |
Instance details Defined in Clay.Color Methods auto :: Color #
Auto Clip # |
Instance details Defined in Clay.Display Methods auto :: Clip #
Auto Overflow # |
Instance details Defined in Clay.Display Methods auto :: Overflow #
Auto PointerEvents # |
Instance details Defined in Clay.Display Methods auto :: PointerEvents #
Auto UserFocus # |
Instance details Defined in Clay.Dynamic Methods auto :: UserFocus #
Auto AlignSelfValue # |
Instance details Defined in Clay.Flexbox Methods auto :: AlignSelfValue #
Auto FontSize # |
Instance details Defined in Clay.Font Methods auto :: FontSize #
Auto Value # |
Instance details Defined in Clay.Common Methods auto :: Value #
Auto HyphenateCharacter # |
Instance details Defined in Clay.Text Methods auto :: HyphenateCharacter #
Auto HyphenateLimit # |
Instance details Defined in Clay.Text Methods auto :: HyphenateLimit #
Auto Hyphens # |
Instance details Defined in Clay.Text Methods auto :: Hyphens #
Auto TextRendering # |
Instance details Defined in Clay.Text Methods auto :: TextRendering #
Auto Time # |
Instance details Defined in Clay.Time Methods auto :: Time #
Auto TimingFunction # |
Instance details Defined in Clay.Transition Methods auto :: TimingFunction #
Auto (Angle a) # |
Instance details Defined in Clay.Size Methods auto :: Angle a #
Auto (Size a) # |
Instance details Defined in Clay.Size Methods auto :: Size a #

class Baseline a where #

Methods

baseline :: a #

#### Instances

Instances details

Baseline AlignItemsValue # |
Instance details Defined in Clay.Flexbox Methods baseline :: AlignItemsValue #
Baseline AlignSelfValue # |
Instance details Defined in Clay.Flexbox Methods baseline :: AlignSelfValue #
Baseline Value # |
Instance details Defined in Clay.Common Methods baseline :: Value #

class Center a where #

Methods

center :: a #

#### Instances

Instances details

Center AlignContentValue # |
Instance details Defined in Clay.Flexbox Methods center :: AlignContentValue #
Center AlignItemsValue # |
Instance details Defined in Clay.Flexbox Methods center :: AlignItemsValue #
Center AlignSelfValue # |
Instance details Defined in Clay.Flexbox Methods center :: AlignSelfValue #
Center JustifyContentValue # |
Instance details Defined in Clay.Flexbox Methods center :: JustifyContentValue #
Center Value # |
Instance details Defined in Clay.Common Methods center :: Value #
Center TextAlign # |
Instance details Defined in Clay.Text Methods center :: TextAlign #

class Inherit a where #

Methods

inherit :: a #

#### Instances

Instances details

Inherit AnimationName # |
Instance details Defined in Clay.Animation Methods inherit :: AnimationName #
Inherit BackgroundAttachment # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundAttachment #
Inherit BackgroundClip # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundClip #
Inherit BackgroundImage # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundImage #
Inherit BackgroundOrigin # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundOrigin #
Inherit BackgroundPosition # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundPosition #
Inherit BackgroundRepeat # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundRepeat #
Inherit BackgroundSize # |
Instance details Defined in Clay.Background Methods inherit :: BackgroundSize #
Inherit Side # |
Instance details Defined in Clay.Background Methods inherit :: Side #
Inherit Stroke # |
Instance details Defined in Clay.Border Methods inherit :: Stroke #
Inherit BoxType # |
Instance details Defined in Clay.Box Methods inherit :: BoxType #
Inherit Color # |
Instance details Defined in Clay.Color Methods inherit :: Color #
Inherit Clear # |
Instance details Defined in Clay.Display Methods inherit :: Clear #
Inherit Clip # |
Instance details Defined in Clay.Display Methods inherit :: Clip #
Inherit Display # |
Instance details Defined in Clay.Display Methods inherit :: Display #
Inherit FloatStyle # |
Instance details Defined in Clay.Display Methods inherit :: FloatStyle #
Inherit Overflow # |
Instance details Defined in Clay.Display Methods inherit :: Overflow #
Inherit PointerEvents # |
Instance details Defined in Clay.Display Methods inherit :: PointerEvents #
Inherit Position # |
Instance details Defined in Clay.Display Methods inherit :: Position #
Inherit Visibility # |
Instance details Defined in Clay.Display Methods inherit :: Visibility #
Inherit UserFocus # |
Instance details Defined in Clay.Dynamic Methods inherit :: UserFocus #
Inherit UserInput # |
Instance details Defined in Clay.Dynamic Methods inherit :: UserInput #
Inherit UserModify # |
Instance details Defined in Clay.Dynamic Methods inherit :: UserModify #
Inherit UserSelect # |
Instance details Defined in Clay.Dynamic Methods inherit :: UserSelect #
Inherit Filter # |
Instance details Defined in Clay.Filter Methods inherit :: Filter #
Inherit AlignContentValue # |
Instance details Defined in Clay.Flexbox Methods inherit :: AlignContentValue #
Inherit AlignItemsValue # |
Instance details Defined in Clay.Flexbox Methods inherit :: AlignItemsValue #
Inherit AlignSelfValue # |
Instance details Defined in Clay.Flexbox Methods inherit :: AlignSelfValue #
Inherit JustifyContentValue # |
Instance details Defined in Clay.Flexbox Methods inherit :: JustifyContentValue #
Inherit FontSize # |
Instance details Defined in Clay.Font Methods inherit :: FontSize #
Inherit FontStyle # |
Instance details Defined in Clay.Font Methods inherit :: FontStyle #
Inherit FontVariant # |
Instance details Defined in Clay.Font Methods inherit :: FontVariant #
Inherit FontWeight # |
Instance details Defined in Clay.Font Methods inherit :: FontWeight #
Inherit ListStyleImage # |
Instance details Defined in Clay.List Methods inherit :: ListStyleImage #
Inherit ListStylePosition # |
Instance details Defined in Clay.List Methods inherit :: ListStylePosition #
Inherit ListStyleType # |
Instance details Defined in Clay.List Methods inherit :: ListStyleType #
Inherit MaskComposite # |
Instance details Defined in Clay.Mask Methods inherit :: MaskComposite #
Inherit Value # |
Instance details Defined in Clay.Common Methods inherit :: Value #
Inherit Content # |
Instance details Defined in Clay.Text Methods inherit :: Content #
Inherit HyphenateCharacter # |
Instance details Defined in Clay.Text Methods inherit :: HyphenateCharacter #
Inherit HyphenateLimit # |
Instance details Defined in Clay.Text Methods inherit :: HyphenateLimit #
Inherit Hyphens # |
Instance details Defined in Clay.Text Methods inherit :: Hyphens #
Inherit OverflowWrap # |
Instance details Defined in Clay.Text Methods inherit :: OverflowWrap #
Inherit TextAlign # |
Instance details Defined in Clay.Text Methods inherit :: TextAlign #
Inherit TextDecoration # |
Instance details Defined in Clay.Text Methods inherit :: TextDecoration #
Inherit TextDirection # |
Instance details Defined in Clay.Text Methods inherit :: TextDirection #
Inherit TextIndent # |
Instance details Defined in Clay.Text Methods inherit :: TextIndent #
Inherit TextOverflow # |
Instance details Defined in Clay.Text Methods inherit :: TextOverflow #
Inherit TextRendering # |
Instance details Defined in Clay.Text Methods inherit :: TextRendering #
Inherit TextTransform # |
Instance details Defined in Clay.Text Methods inherit :: TextTransform #
Inherit WhiteSpace # |
Instance details Defined in Clay.Text Methods inherit :: WhiteSpace #
Inherit WordBreak # |
Instance details Defined in Clay.Text Methods inherit :: WordBreak #
Inherit Time # |
Instance details Defined in Clay.Time Methods inherit :: Time #
Inherit TransformBox # |
Instance details Defined in Clay.Transform Methods inherit :: TransformBox #
Inherit TransformStyle # |
Instance details Defined in Clay.Transform Methods inherit :: TransformStyle #
Inherit (Angle a) # |
Instance details Defined in Clay.Size Methods inherit :: Angle a #
Inherit (Size a) # |
Instance details Defined in Clay.Size Methods inherit :: Size a #

class None a where #

Methods

none :: a #

#### Instances

Instances details

None FillMode # |
Instance details Defined in Clay.Animation Methods none :: FillMode #
None BackgroundImage # |
Instance details Defined in Clay.Background Methods none :: BackgroundImage #
None BackgroundRepeat # |
Instance details Defined in Clay.Background Methods none :: BackgroundRepeat #
None Stroke # |
Instance details Defined in Clay.Border Methods none :: Stroke #
None Color # |
Instance details Defined in Clay.Color Methods none :: Color #
None Clear # |
Instance details Defined in Clay.Display Methods none :: Clear #
None Display # |
Instance details Defined in Clay.Display Methods none :: Display #
None FloatStyle # |
Instance details Defined in Clay.Display Methods none :: FloatStyle #
None PointerEvents # |
Instance details Defined in Clay.Display Methods none :: PointerEvents #
None UserFocus # |
Instance details Defined in Clay.Dynamic Methods none :: UserFocus #
None UserInput # |
Instance details Defined in Clay.Dynamic Methods none :: UserInput #
None UserSelect # |
Instance details Defined in Clay.Dynamic Methods none :: UserSelect #
None Filter # |
Instance details Defined in Clay.Filter Methods none :: Filter #
None ListStyleImage # |
Instance details Defined in Clay.List Methods none :: ListStyleImage #
None ListStyleType # |
Instance details Defined in Clay.List Methods none :: ListStyleType #
None MaskComposite # |
Instance details Defined in Clay.Mask Methods none :: MaskComposite #
None Value # |
Instance details Defined in Clay.Common Methods none :: Value #
None Content # |
Instance details Defined in Clay.Text Methods none :: Content #
None Hyphens # |
Instance details Defined in Clay.Text Methods none :: Hyphens #
None TextDecoration # |
Instance details Defined in Clay.Text Methods none :: TextDecoration #
None TextOverflow # |
Instance details Defined in Clay.Text Methods none :: TextOverflow #
None TextTransform # |
Instance details Defined in Clay.Text Methods none :: TextTransform #
None Time # |
Instance details Defined in Clay.Time Methods none :: Time #
None Transformation # |
Instance details Defined in Clay.Transform Methods none :: Transformation #
None (Size a) # |
Instance details Defined in Clay.Size Methods none :: Size a #

class Normal a where #

Methods

normal :: a #

#### Instances

Instances details

Normal AnimationDirection # |
Instance details Defined in Clay.Animation Methods normal :: AnimationDirection #
Normal IterationCount # |
Instance details Defined in Clay.Animation Methods normal :: IterationCount #
Normal UserFocus # |
Instance details Defined in Clay.Dynamic Methods normal :: UserFocus #
Normal FontStyle # |
Instance details Defined in Clay.Font Methods normal :: FontStyle #
Normal FontVariant # |
Instance details Defined in Clay.Font Methods normal :: FontVariant #
Normal FontWeight # |
Instance details Defined in Clay.Font Methods normal :: FontWeight #
Normal Value # |
Instance details Defined in Clay.Common Methods normal :: Value #
Normal Content # |
Instance details Defined in Clay.Text Methods normal :: Content #
Normal OverflowWrap # |
Instance details Defined in Clay.Text Methods normal :: OverflowWrap #
Normal TextAlign # |
Instance details Defined in Clay.Text Methods normal :: TextAlign #
Normal TextDirection # |
Instance details Defined in Clay.Text Methods normal :: TextDirection #
Normal WhiteSpace # |
Instance details Defined in Clay.Text Methods normal :: WhiteSpace #
Normal WordBreak # |
Instance details Defined in Clay.Text Methods normal :: WordBreak #
Normal Time # |
Instance details Defined in Clay.Time Methods normal :: Time #
Normal (Size a) # |
Instance details Defined in Clay.Size Methods normal :: Size a #

class Visible a where #

Methods

visible :: a #

#### Instances

Instances details

Visible Overflow # |
Instance details Defined in Clay.Display Methods visible :: Overflow #
Visible PointerEvents # |
Instance details Defined in Clay.Display Methods visible :: PointerEvents #
Visible Visibility # |
Instance details Defined in Clay.Display Methods visible :: Visibility #
Visible Value # |
Instance details Defined in Clay.Common Methods visible :: Value #

class Hidden a where #

Methods

hidden :: a #

#### Instances

Instances details

Hidden Overflow # |
Instance details Defined in Clay.Display Methods hidden :: Overflow #
Hidden Visibility # |
Instance details Defined in Clay.Display Methods hidden :: Visibility #
Hidden Value # |
Instance details Defined in Clay.Common Methods hidden :: Value #

class Initial a where #

Methods

initial :: a #

#### Instances

Instances details

Initial AnimationName # |
Instance details Defined in Clay.Animation Methods initial :: AnimationName #
Initial ListStyleImage # |
Instance details Defined in Clay.List Methods initial :: ListStyleImage #
Initial ListStylePosition # |
Instance details Defined in Clay.List Methods initial :: ListStylePosition #
Initial ListStyleType # |
Instance details Defined in Clay.List Methods initial :: ListStyleType #
Initial Value # |
Instance details Defined in Clay.Common Methods initial :: Value #
Initial Content # |
Instance details Defined in Clay.Text Methods initial :: Content #
Initial HyphenateCharacter # |
Instance details Defined in Clay.Text Methods initial :: HyphenateCharacter #
Initial HyphenateLimit # |
Instance details Defined in Clay.Text Methods initial :: HyphenateLimit #
Initial Hyphens # |
Instance details Defined in Clay.Text Methods initial :: Hyphens #
Initial OverflowWrap # |
Instance details Defined in Clay.Text Methods initial :: OverflowWrap #
Initial TextIndent # |
Instance details Defined in Clay.Text Methods initial :: TextIndent #
Initial TextOverflow # |
Instance details Defined in Clay.Text Methods initial :: TextOverflow #
Initial WordBreak # |
Instance details Defined in Clay.Text Methods initial :: WordBreak #
Initial TransformBox # |
Instance details Defined in Clay.Transform Methods initial :: TransformBox #
Initial TransformStyle # |
Instance details Defined in Clay.Transform Methods initial :: TransformStyle #

class Unset a where #

Methods

unset :: a #

#### Instances

Instances details

Unset AnimationName # |
Instance details Defined in Clay.Animation Methods unset :: AnimationName #
Unset Visibility # |
Instance details Defined in Clay.Display Methods unset :: Visibility #
Unset Value # |
Instance details Defined in Clay.Common Methods unset :: Value #
Unset HyphenateCharacter # |
Instance details Defined in Clay.Text Methods unset :: HyphenateCharacter #
Unset HyphenateLimit # |
Instance details Defined in Clay.Text Methods unset :: HyphenateLimit #
Unset Hyphens # |
Instance details Defined in Clay.Text Methods unset :: Hyphens #
Unset OverflowWrap # |
Instance details Defined in Clay.Text Methods unset :: OverflowWrap #
Unset TextIndent # |
Instance details Defined in Clay.Text Methods unset :: TextIndent #
Unset WordBreak # |
Instance details Defined in Clay.Text Methods unset :: WordBreak #
Unset TransformBox # |
Instance details Defined in Clay.Transform Methods unset :: TransformBox #
Unset TransformStyle # |
Instance details Defined in Clay.Transform Methods unset :: TransformStyle #

class Other a where #

The other type class is used to escape from the type safety introduced by embedding CSS properties into the typed world of Clay. `Other` allows you to cast any `Value` to a specific value type.

Methods

other :: Value -> a #

#### Instances

Instances details

Other AnimationDirection # |
Instance details Defined in Clay.Animation Methods other :: Value -> AnimationDirection #
Other AnimationName # |
Instance details Defined in Clay.Animation Methods other :: Value -> AnimationName #
Other FillMode # |
Instance details Defined in Clay.Animation Methods other :: Value -> FillMode #
Other IterationCount # |
Instance details Defined in Clay.Animation Methods other :: Value -> IterationCount #
Other PlayState # |
Instance details Defined in Clay.Animation Methods other :: Value -> PlayState #
Other BackgroundAttachment # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundAttachment #
Other BackgroundClip # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundClip #
Other BackgroundImage # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundImage #
Other BackgroundOrigin # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundOrigin #
Other BackgroundPosition # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundPosition #
Other BackgroundRepeat # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundRepeat #
Other BackgroundSize # |
Instance details Defined in Clay.Background Methods other :: Value -> BackgroundSize #
Other Direction # |
Instance details Defined in Clay.Background Methods other :: Value -> Direction #
Other Location # |
Instance details Defined in Clay.Background Methods other :: Value -> Location #
Other Side # |
Instance details Defined in Clay.Background Methods other :: Value -> Side #
Other Stroke # |
Instance details Defined in Clay.Border Methods other :: Value -> Stroke #
Other Color # |
Instance details Defined in Clay.Color Methods other :: Value -> Color #
Other Clear # |
Instance details Defined in Clay.Display Methods other :: Value -> Clear #
Other Clip # |
Instance details Defined in Clay.Display Methods other :: Value -> Clip #
Other Display # |
Instance details Defined in Clay.Display Methods other :: Value -> Display #
Other Overflow # |
Instance details Defined in Clay.Display Methods other :: Value -> Overflow #
Other PointerEvents # |
Instance details Defined in Clay.Display Methods other :: Value -> PointerEvents #
Other Position # |
Instance details Defined in Clay.Display Methods other :: Value -> Position #
Other Visibility # |
Instance details Defined in Clay.Display Methods other :: Value -> Visibility #
Other AlignContentValue # |
Instance details Defined in Clay.Flexbox Methods other :: Value -> AlignContentValue #
Other AlignItemsValue # |
Instance details Defined in Clay.Flexbox Methods other :: Value -> AlignItemsValue #
Other AlignSelfValue # |
Instance details Defined in Clay.Flexbox Methods other :: Value -> AlignSelfValue #
Other FlexDirection # |
Instance details Defined in Clay.Flexbox Methods other :: Value -> FlexDirection #
Other FlexWrap # |
Instance details Defined in Clay.Flexbox Methods other :: Value -> FlexWrap #
Other JustifyContentValue # |
Instance details Defined in Clay.Flexbox Methods other :: Value -> JustifyContentValue #
Other FontSize # |
Instance details Defined in Clay.Font Methods other :: Value -> FontSize #
Other FontStyle # |
Instance details Defined in Clay.Font Methods other :: Value -> FontStyle #
Other FontVariant # |
Instance details Defined in Clay.Font Methods other :: Value -> FontVariant #
Other FontWeight # |
Instance details Defined in Clay.Font Methods other :: Value -> FontWeight #
Other NamedFont # |
Instance details Defined in Clay.Font Methods other :: Value -> NamedFont #
Other Extend # |
Instance details Defined in Clay.Gradient Methods other :: Value -> Extend #
Other Radial # |
Instance details Defined in Clay.Gradient Methods other :: Value -> Radial #
Other ListStyleImage # |
Instance details Defined in Clay.List Methods other :: Value -> ListStyleImage #
Other ListStylePosition # |
Instance details Defined in Clay.List Methods other :: Value -> ListStylePosition #
Other ListStyleType # |
Instance details Defined in Clay.List Methods other :: Value -> ListStyleType #
Other MaskComposite # |
Instance details Defined in Clay.Mask Methods other :: Value -> MaskComposite #
Other ColorScheme # |
Instance details Defined in Clay.Media Methods other :: Value -> ColorScheme #
Other Resolution # |
Instance details Defined in Clay.Media Methods other :: Value -> Resolution #
Other Value # |
Instance details Defined in Clay.Common Methods other :: Value -> Value #
Other MediaType # |
Instance details Defined in Clay.Stylesheet Methods other :: Value -> MediaType #
Other HyphenateCharacter # |
Instance details Defined in Clay.Text Methods other :: Value -> HyphenateCharacter #
Other HyphenateLimit # |
Instance details Defined in Clay.Text Methods other :: Value -> HyphenateLimit #
Other Hyphens # |
Instance details Defined in Clay.Text Methods other :: Value -> Hyphens #
Other TextAlign # |
Instance details Defined in Clay.Text Methods other :: Value -> TextAlign #
Other TextDecoration # |
Instance details Defined in Clay.Text Methods other :: Value -> TextDecoration #
Other TextDirection # |
Instance details Defined in Clay.Text Methods other :: Value -> TextDirection #
Other TextIndent # |
Instance details Defined in Clay.Text Methods other :: Value -> TextIndent #
Other TextRendering # |
Instance details Defined in Clay.Text Methods other :: Value -> TextRendering #
Other WhiteSpace # |
Instance details Defined in Clay.Text Methods other :: Value -> WhiteSpace #
Other Time # |
Instance details Defined in Clay.Time Methods other :: Value -> Time #
Other TimingFunction # |
Instance details Defined in Clay.Transition Methods other :: Value -> TimingFunction #
Other (Angle a) # |
Instance details Defined in Clay.Size Methods other :: Value -> Angle a #
Other (Size a) # |
Instance details Defined in Clay.Size Methods other :: Value -> Size a #

allValue :: Value #

autoValue :: Value #

baselineValue :: Value #

centerValue :: Value #

inheritValue :: Value #

normalValue :: Value #

noneValue :: Value #

visibleValue :: Value #

hiddenValue :: Value #

initialValue :: Value #

unsetValue :: Value #

webkitPrefix :: (Text, Text) #

Common list browser prefixes to make experimental properties work in different browsers.

emptyPrefix :: (Text, Text) #

webkit :: Prefixed #

browsers :: Prefixed #

call :: (IsString s, Monoid s) => s -> s -> s #

Syntax for CSS function call.

fracMod :: RealFrac a => a -> a -> a #

Some auxiliary mathematical functions.

decimalRound :: RealFrac a => a -> Int -> a #