shakespeare-2.0.30: A toolkit for making compile-time interpolated templates
Safe HaskellNone
LanguageHaskell2010

Text.Cassius.Ordered

Description

This module is the twin brother of module Text.Cassius. The difference is that these parsers preserv the given order of attributes and mixin blocks.

let bams = [cassiusMixin|
              bam1:bam2
              ^{bins}
              bam3:bam4
           |] :: Mixin
    bins = [cassiusMixin|
              bin1:bin2
           |] :: Mixin
 in renderCss ([Text.Ordered.lucius|foo{bar1:bar2;^{bams};bar3:bar4;}|] undefined)
"foo{bar1:bar2;bam1:bam2;bin1:bin2;bam3:bam4;bar3:bar4}"
Synopsis

Datatypes

data Css Source #

type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css Source #

Type class

class ToCss a where Source #

Methods

toCss :: a -> Builder Source #

Instances

Instances details
ToCss Text Source # 
Instance details

Defined in Text.Internal.Css

Methods

toCss :: Text -> Builder Source #

ToCss Text Source # 
Instance details

Defined in Text.Internal.Css

Methods

toCss :: Text -> Builder Source #

ToCss PercentageSize Source # 
Instance details

Defined in Text.Internal.CssCommon

ToCss AbsoluteSize Source # 
Instance details

Defined in Text.Internal.CssCommon

ToCss Color Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

toCss :: Color -> Builder Source #

ToCss EmSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

toCss :: EmSize -> Builder Source #

ToCss ExSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

toCss :: ExSize -> Builder Source #

ToCss PixelSize Source # 
Instance details

Defined in Text.Internal.CssCommon

ToCss [Char] Source # 
Instance details

Defined in Text.Internal.Css

Methods

toCss :: [Char] -> Builder Source #

Rendering

renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text Source #

Parsing

cassius :: QuasiQuoter Source #

Since: 2.0.30

cassiusFile :: FilePath -> Q Exp Source #

Since: 2.0.30

cassiusFileDebug :: FilePath -> Q Exp Source #

Since: 2.0.30

cassiusFileReload :: FilePath -> Q Exp Source #

Since: 2.0.30

Mixims

cassiusMixin :: QuasiQuoter Source #

Create a mixin with Cassius syntax.

| @since 2.0.30

data Mixin Source #

Instances

Instances details
Semigroup Mixin Source # 
Instance details

Defined in Text.Internal.Css

Methods

(<>) :: Mixin -> Mixin -> Mixin #

sconcat :: NonEmpty Mixin -> Mixin #

stimes :: Integral b => b -> Mixin -> Mixin #

Monoid Mixin Source # 
Instance details

Defined in Text.Internal.Css

Methods

mempty :: Mixin #

mappend :: Mixin -> Mixin -> Mixin #

mconcat :: [Mixin] -> Mixin #

Lift Mixin Source # 
Instance details

Defined in Text.Internal.Css

Methods

lift :: Mixin -> Q Exp #

liftTyped :: Mixin -> Q (TExp Mixin) #

ToCss instances

Color

data Color Source #

Constructors

Color Word8 Word8 Word8 

Instances

Instances details
Show Color Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

ToCss Color Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

toCss :: Color -> Builder Source #

Size

mkSize :: String -> ExpQ Source #

Create a CSS size, e.g. $(mkSize "100px").

data AbsoluteUnit Source #

Absolute size units.

Constructors

Centimeter 
Inch 
Millimeter 
Pica 
Point 

Instances

Instances details
Eq AbsoluteUnit Source # 
Instance details

Defined in Text.Internal.CssCommon

Show AbsoluteUnit Source # 
Instance details

Defined in Text.Internal.CssCommon

data AbsoluteSize Source #

Not intended for direct use, see mkSize.

Constructors

AbsoluteSize 

Fields

Instances

Instances details
Eq AbsoluteSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Fractional AbsoluteSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Num AbsoluteSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Ord AbsoluteSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Show AbsoluteSize Source # 
Instance details

Defined in Text.Internal.CssCommon

ToCss AbsoluteSize Source # 
Instance details

Defined in Text.Internal.CssCommon

absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize Source #

Constructs AbsoluteSize. Not intended for direct use, see mkSize.

data EmSize Source #

Constructors

EmSize Rational 

Instances

Instances details
Eq EmSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

(==) :: EmSize -> EmSize -> Bool #

(/=) :: EmSize -> EmSize -> Bool #

Fractional EmSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Num EmSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Ord EmSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Show EmSize Source # 
Instance details

Defined in Text.Internal.CssCommon

ToCss EmSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

toCss :: EmSize -> Builder Source #

data ExSize Source #

Constructors

ExSize Rational 

Instances

Instances details
Eq ExSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

(==) :: ExSize -> ExSize -> Bool #

(/=) :: ExSize -> ExSize -> Bool #

Fractional ExSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Num ExSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Ord ExSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Show ExSize Source # 
Instance details

Defined in Text.Internal.CssCommon

ToCss ExSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Methods

toCss :: ExSize -> Builder Source #

data PercentageSize Source #

Not intended for direct use, see mkSize.

Constructors

PercentageSize 

Fields

Instances

Instances details
Eq PercentageSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Fractional PercentageSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Num PercentageSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Ord PercentageSize Source # 
Instance details

Defined in Text.Internal.CssCommon

Show PercentageSize Source # 
Instance details

Defined in Text.Internal.CssCommon

ToCss PercentageSize Source # 
Instance details

Defined in Text.Internal.CssCommon

percentageSize :: Rational -> PercentageSize Source #

Constructs PercentageSize. Not intended for direct use, see mkSize.

Internal

cassiusUsedIdentifiers :: String -> [(Deref, VarType)] Source #

Determine which identifiers are used by the given template, useful for creating systems like yesod devel. | @since 2.0.30