cascading-0.1.0: DSL for HTML CSS (Cascading Style Sheets)

MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone

Data.CSS.Build

Contents

Description

 

Synopsis

Media types

onAll :: Monad m => ReaderT (Set MediaType) m a -> m aSource

Specify stylesheets for all media,

onMedia :: Monad m => [MediaType] -> ReaderT (Set MediaType) m a -> m aSource

Specify stylesheets for the given media.

Selectors

select :: Monad m => [Selector] -> ReaderT BuildCfg m a -> ReaderT (Set MediaType) m aSource

Specify the selector.

Selector modifiers

below :: MonadWriter CSS m => [Selector] -> m a -> m aSource

Given children of the current selector.

local

Arguments

:: MonadReader r m 
=> forall a .  
=> (r -> r)

The function to modify the environment.

-> m a

Reader to run in the modified environment.

-> m a 

Executes a computation in a modified environment.

Setting properties

($=)Source

Arguments

:: ToPropValue a 
=> PropName

Property to set.

-> a

Value to set the property to.

-> SetProp 

Set the given property to the given value. (infix 2)

Infix version of setProp.

important :: MonadWriter CSS m => m a -> m aSource

Mark all property values important.

inherit :: (MonadReader BuildCfg m, MonadWriter CSS m) => PropName -> m ()Source

Set the given property to be inherited.

setPropSource

Arguments

:: ToPropValue a 
=> PropName

Property to set.

-> a

Value to set the property to.

-> SetProp 

Set the given property to the given value.

Non-infix version of $=.

Auxiliary

importFrom :: MonadWriter CSS m => MediaType -> Text -> m ()Source

Import the given style sheet for the given media type.

importUrl :: (MonadRoute m, MonadWriter CSS m) => MediaType -> URL m -> m ()Source

Import the given style sheet for the given media type.