-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | DSL for HTML CSS (Cascading Style Sheets)
--
-- This library implements an HTML-specific domain-specific language for
-- cascading style sheets (CSS) in the spirit of blaze-html. See the
-- documentation of the Data.CSS module for a tutorial.
@package cascading
@version 0.1.0
module Data.CSS.Utils
-- | Render the given list of builders separated by commas.
commas :: [Builder] -> Builder
-- | Render the given list of builders separated by commas.
commasBS :: [ByteString] -> Builder
-- | Renders the given CSS string in double-quotes, escaped as necessary.
cssString :: Text -> Builder
-- | showHexInt p n builds the hexadecimal representation of
-- n with at least p digits. Prepends zeroes to fill.
showHexInt :: Integral a => Int -> a -> Builder
-- | Lossily convert the given Real number into a decimal
-- representation suitable for CSS.
showReal :: Real a => a -> Builder
module Data.CSS.Properties.Classes
-- | Class of types, which feature CSS lengths.
--
-- Minimal complete definition: _Em, _Ex, _Mm,
-- _Px, zeroLen.
class HasLength len where _Cm = _Mm . iso (/ 10) (* 10) _In = _Mm . iso (/ 25.4) (* 25.4) _Pc = _Mm . iso (/ (127 / 30)) (* (127 / 30)) _Pt = _Mm . iso (/ (127 / 360)) (* (127 / 360))
_Cm :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
_Em :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
_Ex :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
_In :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
_Mm :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
_Pc :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
_Pt :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
_Px :: (HasLength len, Fractional a, Real a) => Prism' (len a) a
zeroLen :: HasLength len => len a
-- | Class for length types with a notion of automatic length.
class HasAutoLength len
autoLen :: HasAutoLength len => len a
-- | Class for length types with percentages.
--
-- Minimal complete definition: _Factor.
class HasPercent len where _Percent = _Factor . iso (* 100) (/ 100)
_Factor :: (HasPercent len, Fractional a, Real a) => Prism' (len a) a
_Percent :: (HasPercent len, Fractional a, Real a) => Prism' (len a) a
module Data.CSS.Types
-- | Cascading style sheets.
data CSS
CSS :: Map Text (Set MediaType) -> Map (Set MediaType) [Property] -> CSS
-- | External stylesheets (url, media-type).
_cssImports :: CSS -> Map Text (Set MediaType)
-- | Properties.
_cssProps :: CSS -> Map (Set MediaType) [Property]
cssImports :: Lens' CSS (Map Text (Set MediaType))
cssProps :: Lens' CSS (Map (Set MediaType) [Property])
-- | Style properties.
data Property
Property :: [Selector] -> PropName -> PropValue -> Bool -> Property
-- | Selector for this property.
_propSelector :: Property -> [Selector]
-- | Property name.
_propName :: Property -> PropName
-- | Property value.
_propValue :: Property -> PropValue
-- | !important property?
_propImportant :: Property -> Bool
propName :: Lens' Property PropName
propSelector :: Lens' Property [Selector]
propValue :: Lens' Property PropValue
propImportant :: Lens' Property Bool
-- | CSS builder configuration.
data BuildCfg
BuildCfg :: Set MediaType -> [Selector] -> BuildCfg
-- | Current media type.
_bcMedia :: BuildCfg -> Set MediaType
-- | Current selector.
_bcSelector :: BuildCfg -> [Selector]
bcMedia :: Lens' BuildCfg (Set MediaType)
bcSelector :: Lens' BuildCfg [Selector]
-- | Property setter.
type SetProp = forall m. SetPropM m
-- | Parametric property setter.
type SetPropM m = (MonadReader BuildCfg m, MonadWriter CSS m) => m ()
-- | Media types, e.g. all or print.
newtype MediaType
MediaType :: ByteString -> MediaType
_mediaTypeStr :: MediaType -> ByteString
mediaTypeStr :: Iso' MediaType ByteString
-- | Property names, e.g. font-family.
newtype PropName
PropName :: ByteString -> PropName
_propNameStr :: PropName -> ByteString
propNameStr :: Iso' PropName ByteString
-- | Property values, e.g. sans-serif.
newtype PropValue
PropValue :: ByteString -> PropValue
_propValueStr :: PropValue -> ByteString
propValueStr :: Iso' PropValue ByteString
-- | Selectors, e.g. * or #content p.
newtype Selector
Selector :: ByteString -> Selector
_selectorStr :: Selector -> ByteString
selectorStr :: Iso' Selector ByteString
-- | Types that feature a conversion function to PropValue.
class ToPropValue a where toPropBuilder = fromByteString . _propValueStr . toPropValue toPropValue = PropValue . toByteString . toPropBuilder
toPropBuilder :: ToPropValue a => a -> Builder
toPropValue :: ToPropValue a => a -> PropValue
instance [incoherent] Typeable MediaType
instance [incoherent] Typeable PropName
instance [incoherent] Typeable PropValue
instance [incoherent] Typeable Selector
instance [incoherent] Typeable Property
instance [incoherent] Typeable CSS
instance [incoherent] Typeable BuildCfg
instance [incoherent] Data MediaType
instance [incoherent] Eq MediaType
instance [incoherent] Ord MediaType
instance [incoherent] Read MediaType
instance [incoherent] Show MediaType
instance [incoherent] Data PropName
instance [incoherent] Eq PropName
instance [incoherent] Ord PropName
instance [incoherent] Read PropName
instance [incoherent] Show PropName
instance [incoherent] Data PropValue
instance [incoherent] Eq PropValue
instance [incoherent] Ord PropValue
instance [incoherent] Read PropValue
instance [incoherent] Show PropValue
instance [incoherent] Data Selector
instance [incoherent] Eq Selector
instance [incoherent] Ord Selector
instance [incoherent] Read Selector
instance [incoherent] Show Selector
instance [incoherent] Data Property
instance [incoherent] Eq Property
instance [incoherent] Ord Property
instance [incoherent] Read Property
instance [incoherent] Show Property
instance [incoherent] Data CSS
instance [incoherent] Eq CSS
instance [incoherent] Ord CSS
instance [incoherent] Read CSS
instance [incoherent] Show CSS
instance [incoherent] Data BuildCfg
instance [incoherent] Eq BuildCfg
instance [incoherent] Ord BuildCfg
instance [incoherent] Read BuildCfg
instance [incoherent] Show BuildCfg
instance [incoherent] IsString Selector
instance [incoherent] ToPropValue PropValue
instance [incoherent] IsString PropValue
instance [incoherent] IsString PropName
instance [incoherent] IsString MediaType
instance [incoherent] Monoid CSS
instance [incoherent] (ToPropValue a, ToPropValue b, ToPropValue c) => ToPropValue (a, b, c)
instance [incoherent] (ToPropValue a, ToPropValue b) => ToPropValue (a, b)
instance [incoherent] ToPropValue a => ToPropValue [a]
instance [incoherent] (Floating a, RealFrac a) => ToPropValue (Colour a)
instance [incoherent] (Floating a, RealFrac a) => ToPropValue (AlphaColour a)
instance [incoherent] ToPropValue Text
instance [incoherent] ToPropValue Text
instance [incoherent] ToPropValue [Char]
instance [incoherent] ToPropValue Char
instance [incoherent] ToPropValue ByteString
instance [incoherent] ToPropValue ByteString
instance [incoherent] Integral a => ToPropValue (Ratio a)
instance [incoherent] ToPropValue Word64
instance [incoherent] ToPropValue Word32
instance [incoherent] ToPropValue Word16
instance [incoherent] ToPropValue Word8
instance [incoherent] ToPropValue Word
instance [incoherent] ToPropValue Integer
instance [incoherent] ToPropValue Int64
instance [incoherent] ToPropValue Int32
instance [incoherent] ToPropValue Int16
instance [incoherent] ToPropValue Int8
instance [incoherent] ToPropValue Int
instance [incoherent] ToPropValue Float
instance [incoherent] ToPropValue Double
module Data.CSS.Properties.Compat
-- | Adds vendor-prefixed properties for all properties in the given style
-- sheet. The following vendors are currently added:
--
--
-- - Microsoft (-ms-),
-- - Mozilla (-moz-),
-- - Opera (-o-),
-- - WebKit (-webkit-).
--
--
-- This combinator keeps the original (non-prefixed) property and does
-- not prefix properties that already have a vendor prefix.
vendors :: MonadWriter CSS m => m a -> m a
module Data.CSS.Properties.Utils
-- | Convenience wrapper around maybe for properties. Renders as the
-- given bytestring if Nothing.
maybeBuilder :: ToPropValue a => ByteString -> Maybe a -> Builder
-- | Convenience wrapper around maybe for properties. Renders as the
-- given bytestring if Nothing.
maybeProp :: ToPropValue a => ByteString -> Maybe a -> PropValue
module Data.CSS.Properties.Types
-- | Length transformer to add lengths in various CSS units.
data Length a
-- | Length transformer to add automatic lengths.
data AutoLen len a
-- | Length transformer to add percental lengths.
data FactorLen len a
-- | CSS strings.
newtype CssString a
CssString :: a -> CssString a
getCssString :: CssString a -> a
-- | CSS URLs.
newtype CssUrl a
CssUrl :: a -> CssUrl a
getCssUrl :: CssUrl a -> a
-- | Edge-oriented specifications.
data Edge a
-- | All edges.
Edges :: [a] -> Edge a
-- | Bottom edge.
BottomEdge :: a -> Edge a
-- | Left edge.
LeftEdge :: a -> Edge a
-- | Right edge.
RightEdge :: a -> Edge a
-- | Top edge.
TopEdge :: a -> Edge a
-- | Background attachment.
data BackgroundAttachment
-- | fixed background.
FixedBgr :: BackgroundAttachment
-- | scroll background.
ScrollBgr :: BackgroundAttachment
-- | Background repeating.
data BackgroundRepeat
-- | no-repeat.
NoRepeat :: BackgroundRepeat
-- | repeat both axes.
Repeat :: BackgroundRepeat
-- | repeat-x axis.
RepeatX :: BackgroundRepeat
-- | repeat-y axis.
RepeatY :: BackgroundRepeat
-- | Border style.
data BorderStyle
NoBorder :: BorderStyle
HiddenBorder :: BorderStyle
DottedBorder :: BorderStyle
DashedBorder :: BorderStyle
SolidBorder :: BorderStyle
DoubleBorder :: BorderStyle
GrooveBorder :: BorderStyle
RidgeBorder :: BorderStyle
InsetBorder :: BorderStyle
OutsetBorder :: BorderStyle
-- | Border widths.
data BorderWidth a
-- | Custom border width.
BorderWidth :: (Length a) -> BorderWidth a
-- | Medium border width.
MediumWidth :: BorderWidth a
-- | Thick border width.
ThickWidth :: BorderWidth a
-- | Thin border width.
ThinWidth :: BorderWidth a
-- | Font families.
data FontFamily
-- | Generic cursive font.
CursiveFont :: FontFamily
-- | Generic fantasy font.
FantasyFont :: FontFamily
-- | Generic monospace font.
MonospaceFont :: FontFamily
-- | Generic sans-serif font.
SansSerifFont :: FontFamily
-- | Generic serif font.
SerifFont :: FontFamily
-- | Specific named font.
NamedFont :: (CssString Text) -> FontFamily
-- | Font sizes.
data FontSize a
-- | Absolutely xx-small size.
XXSmallSize :: FontSize a
-- | Absolutely x-small size.
XSmallSize :: FontSize a
-- | Absolutely small size.
SmallSize :: FontSize a
-- | Absolutely medium size.
MediumSize :: FontSize a
-- | Absolutely large size.
LargeSize :: FontSize a
-- | Absolutely x-large size.
XLargeSize :: FontSize a
-- | Absolutely xx-large size.
XXLargeSize :: FontSize a
-- | Relatively larger size.
LargerSize :: FontSize a
-- | Relatively smaller size.
SmallerSize :: FontSize a
-- | Specific font size.
LengthSize :: (FactorLen Length a) -> FontSize a
-- | Font styles.
data FontStyle
-- | Select italic style.
ItalicStyle :: FontStyle
-- | Select oblique style.
ObliqueStyle :: FontStyle
-- | Select normal style.
NormalStyle :: FontStyle
-- | Font variants.
data FontVariant
-- | Select normal font.
NormalVariant :: FontVariant
-- | Select small-caps font.
SmallCapsVariant :: FontVariant
-- | Font weight.
data FontWeight
-- | Relatively bolder font weight.
BolderWeight :: FontWeight
-- | Relatively lighter font weight.
LighterWeight :: FontWeight
-- | Specific font weight (1-9), 4 = normal, 7 = bold.
FontWeight :: Int -> FontWeight
-- | Parts for the content property.
data ContentPart url
-- | attr(x) part.
AttrPart :: ByteString -> ContentPart url
-- | close-quote part.
CloseQuotePart :: ContentPart url
-- | counter(x, y) part.
CounterPart :: ByteString -> (Maybe ListStyle) -> ContentPart url
-- | counters(x, y) part.
CountersPart :: ByteString -> Text -> (Maybe ListStyle) -> ContentPart url
-- | no-close-quote part.
NoCloseQuotePart :: ContentPart url
-- | no-open-quote part.
NoOpenQuotePart :: ContentPart url
-- | open-quote part.
OpenQuotePart :: ContentPart url
-- | Text part.
TextPart :: (CssString Text) -> ContentPart url
-- | url(x) part.
UriPart :: url -> ContentPart url
-- | Clipping modes.
data ClipMode a
-- | Rectangular clipping region.
ClipRect :: (AutoLen Length a) -> (AutoLen Length a) -> (AutoLen Length a) -> (AutoLen Length a) -> ClipMode a
-- | Display modes.
data DisplayMode
-- | block display.
BlockDisplay :: DisplayMode
-- | inline-block display.
InlineBlockDisplay :: DisplayMode
-- | inline display.
InlineDisplay :: DisplayMode
-- | list-item display
ListItemDisplay :: DisplayMode
-- | none display.
NoneDisplay :: DisplayMode
-- | table display.
TableDisplay :: DisplayMode
-- | inline-table display.
InlineTableDisplay :: DisplayMode
-- | table-row-group display.
TableRowGroupDisplay :: DisplayMode
-- | table-column display.
TableColumnDisplay :: DisplayMode
-- | table-column-group display.
TableColumnGroupDisplay :: DisplayMode
-- | table-header-group display.
TableHeaderGroupDisplay :: DisplayMode
-- | table-footer-group display.
TableFooterGroupDisplay :: DisplayMode
-- | table-row display.
TableRowDisplay :: DisplayMode
-- | table-cell display.
TableCellDisplay :: DisplayMode
-- | table-caption display.
TableCaptionDisplay :: DisplayMode
-- | Floating edge.
data FloatEdge
LeftFloat :: FloatEdge
RightFloat :: FloatEdge
-- | Overflow handling mode.
data OverflowMode
-- | auto overflow handling.
AutoOverflow :: OverflowMode
-- | hidden overflow handling.
HiddenOverflow :: OverflowMode
-- | scroll overflow handling.
ScrollOverflow :: OverflowMode
-- | visible overflow handling.
VisibleOverflow :: OverflowMode
-- | Position modes.
data PositionMode
-- | absolute positioning.
AbsolutePos :: PositionMode
-- | fixed positioning.
FixedPos :: PositionMode
-- | relative positioning.
RelativePos :: PositionMode
-- | static positioning.
StaticPos :: PositionMode
-- | Visibility modes.
data VisibilityMode
-- | collapse visibility.
CollapseVisibility :: VisibilityMode
-- | hidden visibility.
HiddenVisibility :: VisibilityMode
-- | visible visibility.
VisibleVisibility :: VisibilityMode
-- | List number/bullet position.
data ListPosition
-- | inside the box.
InsideList :: ListPosition
-- | outside of the box.
OutsideList :: ListPosition
-- | List number/bullet styles.
data ListStyle
-- | armenian numbering.
ArmenianList :: ListStyle
-- | circle bullets.
CircleList :: ListStyle
-- | decimal-leading-zero numbering.
DecimalLeadingZeroList :: ListStyle
-- | decimal numbering.
DecimalList :: ListStyle
-- | disc bullets.
DiscList :: ListStyle
-- | georgian numbering.
GeorgianList :: ListStyle
-- | lower-alpha numbering.
LowerAlphaList :: ListStyle
-- | lower-greek numbering.
LowerGreekList :: ListStyle
-- | lower-latin numbering.
LowerLatinList :: ListStyle
-- | lower-roman numbering.
LowerRomanList :: ListStyle
-- | square bullets.
SquareList :: ListStyle
-- | upper-alpha numbering.
UpperAlphaList :: ListStyle
-- | upper-latin numbering.
UpperLatinList :: ListStyle
-- | upper-roman numbering.
UpperRomanList :: ListStyle
-- | Page break rules.
data PageBreak :: * -> *
AlwaysBreak :: PageBreak AnyBreak
AvoidBreak :: PageBreak InsideBreak
LeftBreak :: PageBreak AnyBreak
RightBreak :: PageBreak AnyBreak
-- | Page break context: any.
data AnyBreak
-- | Page break context: page-break-inside.
data InsideBreak
-- | Page selectors for paged media.
data PageSelector
-- | Select all pages (@page).
AllPages :: PageSelector
-- | Select first page (@page :first).
FirstPage :: PageSelector
-- | Select all left pages (@page :left).
LeftPages :: PageSelector
-- | Select all right pages (@page :right).
RightPages :: PageSelector
-- | Table caption sides.
data CaptionSide
-- | Table's bottom side.
BottomSide :: CaptionSide
-- | Table's top side.
TopSide :: CaptionSide
-- | Table layout.
data TableLayout
-- | auto layout.
AutoLayout :: TableLayout
-- | fixed layout.
FixedLayout :: TableLayout
-- | Text alignment.
data TextAlign
-- | center alignment.
CenterAlign :: TextAlign
-- | justify alignment.
JustifyAlign :: TextAlign
-- | left alignment.
LeftAlign :: TextAlign
-- | right alignment.
RightAlign :: TextAlign
-- | Text decoration.
data TextDecoration
-- | blink text.
BlinkText :: TextDecoration
-- | line-through text.
LineThroughText :: TextDecoration
-- | overline text.
OverlineText :: TextDecoration
-- | underline text.
UnderlineText :: TextDecoration
-- | Text direction.
data TextDirection
LeftToRight :: TextDirection
RightToLeft :: TextDirection
-- | Text transformation modes.
data TextTransform
-- | capitalize transform.
CapitalizeText :: TextTransform
-- | lowercase transform.
LowercaseText :: TextTransform
-- | uppercase transform.
UppercaseText :: TextTransform
-- | Text wrapping modes.
data TextWrapMode
-- | normal wrapping.
NormalWrapping :: TextWrapMode
-- | nowrap wrapping.
NowrapWrapping :: TextWrapMode
-- | pre-line wrapping.
PreLineWrapping :: TextWrapMode
-- | pre-wrap wrapping.
PreWrapWrapping :: TextWrapMode
-- | pre wrapping.
PreWrapping :: TextWrapMode
-- | Unicode bidi embedding mode.
data UnicodeBidiMode
-- | embed mode.
EmbedBidi :: UnicodeBidiMode
-- | normal mode.
NormalBidi :: UnicodeBidiMode
-- | bidi-override mode.
OverrideBidi :: UnicodeBidiMode
-- | Vertical text/box alignment.
data VerticalAlign a
BaselineAlign :: VerticalAlign a
BottomAlign :: VerticalAlign a
LengthAlign :: (FactorLen Length a) -> VerticalAlign a
MiddleAlign :: VerticalAlign a
SubAlign :: VerticalAlign a
SuperAlign :: VerticalAlign a
TextBottomAlign :: VerticalAlign a
TextTopAlign :: VerticalAlign a
TopAlign :: VerticalAlign a
-- | Cursors.
data Cursor url
-- | crosshair cursor.
CrosshairCursor :: Cursor url
-- | Cursor from one of the given URLs.
CursorFrom :: [url] -> Cursor url
-- | default cursor.
DefaultCursor :: Cursor url
-- | e-resize cursor.
EResizeCursor :: Cursor url
-- | help cursor.
HelpCursor :: Cursor url
-- | move cursor.
MoveCursor :: Cursor url
-- | n-resize cursor.
NResizeCursor :: Cursor url
-- | ne-resize cursor.
NeResizeCursor :: Cursor url
-- | nw-resize cursor.
NwResizeCursor :: Cursor url
-- | pointer cursor.
PointerCursor :: Cursor url
-- | progress cursor.
ProgressCursor :: Cursor url
-- | s-resize cursor.
SResizeCursor :: Cursor url
-- | se-resize cursor.
SeResizeCursor :: Cursor url
-- | sw-resize cursor.
SwResizeCursor :: Cursor url
-- | text cursor.
TextCursor :: Cursor url
-- | w-resize cursor.
WResizeCursor :: Cursor url
-- | wait cursor.
WaitCursor :: Cursor url
instance Typeable BackgroundAttachment
instance Typeable BackgroundRepeat
instance Typeable BorderStyle
instance Typeable CaptionSide
instance Typeable1 CssString
instance Typeable1 CssUrl
instance Typeable1 Cursor
instance Typeable DisplayMode
instance Typeable1 Edge
instance Typeable FloatEdge
instance Typeable FontFamily
instance Typeable FontStyle
instance Typeable FontVariant
instance Typeable FontWeight
instance Typeable1 Length
instance Typeable1 FontSize
instance Typeable1 ClipMode
instance Typeable1 BorderWidth
instance Typeable ListPosition
instance Typeable ListStyle
instance Typeable1 ContentPart
instance Typeable OverflowMode
instance Typeable PageSelector
instance Typeable PositionMode
instance Typeable TableLayout
instance Typeable TextAlign
instance Typeable TextDecoration
instance Typeable TextDirection
instance Typeable TextTransform
instance Typeable TextWrapMode
instance Typeable UnicodeBidiMode
instance Typeable1 VerticalAlign
instance Typeable VisibilityMode
instance Eq (len a) => Eq (AutoLen len a)
instance Ord (len a) => Ord (AutoLen len a)
instance Show (len a) => Show (AutoLen len a)
instance Data BackgroundAttachment
instance Eq BackgroundAttachment
instance Ord BackgroundAttachment
instance Read BackgroundAttachment
instance Show BackgroundAttachment
instance Data BackgroundRepeat
instance Eq BackgroundRepeat
instance Ord BackgroundRepeat
instance Read BackgroundRepeat
instance Show BackgroundRepeat
instance Data BorderStyle
instance Eq BorderStyle
instance Ord BorderStyle
instance Read BorderStyle
instance Show BorderStyle
instance Data CaptionSide
instance Eq CaptionSide
instance Ord CaptionSide
instance Read CaptionSide
instance Show CaptionSide
instance Data a => Data (CssString a)
instance Eq a => Eq (CssString a)
instance Foldable CssString
instance Functor CssString
instance Ord a => Ord (CssString a)
instance Read a => Read (CssString a)
instance Show a => Show (CssString a)
instance Traversable CssString
instance Data a => Data (CssUrl a)
instance Eq a => Eq (CssUrl a)
instance Foldable CssUrl
instance Functor CssUrl
instance Ord a => Ord (CssUrl a)
instance Read a => Read (CssUrl a)
instance Show a => Show (CssUrl a)
instance Traversable CssUrl
instance Data url => Data (Cursor url)
instance Eq url => Eq (Cursor url)
instance Foldable Cursor
instance Functor Cursor
instance Ord url => Ord (Cursor url)
instance Read url => Read (Cursor url)
instance Show url => Show (Cursor url)
instance Traversable Cursor
instance Data DisplayMode
instance Eq DisplayMode
instance Ord DisplayMode
instance Read DisplayMode
instance Show DisplayMode
instance Data a => Data (Edge a)
instance Eq a => Eq (Edge a)
instance Foldable Edge
instance Functor Edge
instance Ord a => Ord (Edge a)
instance Read a => Read (Edge a)
instance Show a => Show (Edge a)
instance Traversable Edge
instance (Eq a, Eq (len a)) => Eq (FactorLen len a)
instance (Ord a, Ord (len a)) => Ord (FactorLen len a)
instance (Show a, Show (len a)) => Show (FactorLen len a)
instance Data FloatEdge
instance Eq FloatEdge
instance Ord FloatEdge
instance Read FloatEdge
instance Show FloatEdge
instance Data FontFamily
instance Eq FontFamily
instance Ord FontFamily
instance Read FontFamily
instance Show FontFamily
instance Data FontStyle
instance Eq FontStyle
instance Ord FontStyle
instance Read FontStyle
instance Show FontStyle
instance Data FontVariant
instance Eq FontVariant
instance Ord FontVariant
instance Read FontVariant
instance Show FontVariant
instance Data FontWeight
instance Eq FontWeight
instance Ord FontWeight
instance Read FontWeight
instance Show FontWeight
instance Eq a => Eq (Length a)
instance Ord a => Ord (Length a)
instance Show a => Show (Length a)
instance Eq a => Eq (FontSize a)
instance Ord a => Ord (FontSize a)
instance Show a => Show (FontSize a)
instance Eq a => Eq (ClipMode a)
instance Ord a => Ord (ClipMode a)
instance Show a => Show (ClipMode a)
instance Eq a => Eq (BorderWidth a)
instance Ord a => Ord (BorderWidth a)
instance Show a => Show (BorderWidth a)
instance Data ListPosition
instance Eq ListPosition
instance Ord ListPosition
instance Read ListPosition
instance Show ListPosition
instance Data ListStyle
instance Eq ListStyle
instance Ord ListStyle
instance Read ListStyle
instance Show ListStyle
instance Data url => Data (ContentPart url)
instance Eq url => Eq (ContentPart url)
instance Functor ContentPart
instance Ord url => Ord (ContentPart url)
instance Read url => Read (ContentPart url)
instance Show url => Show (ContentPart url)
instance Data OverflowMode
instance Eq OverflowMode
instance Ord OverflowMode
instance Read OverflowMode
instance Show OverflowMode
instance Data PageSelector
instance Eq PageSelector
instance Ord PageSelector
instance Read PageSelector
instance Show PageSelector
instance Data PositionMode
instance Eq PositionMode
instance Ord PositionMode
instance Read PositionMode
instance Show PositionMode
instance Data TableLayout
instance Eq TableLayout
instance Ord TableLayout
instance Read TableLayout
instance Show TableLayout
instance Data TextAlign
instance Eq TextAlign
instance Ord TextAlign
instance Read TextAlign
instance Show TextAlign
instance Data TextDecoration
instance Eq TextDecoration
instance Ord TextDecoration
instance Read TextDecoration
instance Show TextDecoration
instance Data TextDirection
instance Eq TextDirection
instance Ord TextDirection
instance Read TextDirection
instance Show TextDirection
instance Data TextTransform
instance Eq TextTransform
instance Ord TextTransform
instance Read TextTransform
instance Show TextTransform
instance Data TextWrapMode
instance Eq TextWrapMode
instance Ord TextWrapMode
instance Read TextWrapMode
instance Show TextWrapMode
instance Data UnicodeBidiMode
instance Eq UnicodeBidiMode
instance Ord UnicodeBidiMode
instance Read UnicodeBidiMode
instance Show UnicodeBidiMode
instance Eq a => Eq (VerticalAlign a)
instance Ord a => Ord (VerticalAlign a)
instance Show a => Show (VerticalAlign a)
instance Data VisibilityMode
instance Eq VisibilityMode
instance Ord VisibilityMode
instance Read VisibilityMode
instance Show VisibilityMode
instance ToPropValue VisibilityMode
instance Real a => ToPropValue (VerticalAlign a)
instance HasPercent VerticalAlign
instance HasLength VerticalAlign
instance ToPropValue UnicodeBidiMode
instance ToPropValue TextWrapMode
instance ToPropValue TextTransform
instance ToPropValue TextDirection
instance ToPropValue TextDecoration
instance ToPropValue TextAlign
instance ToPropValue TableLayout
instance ToPropValue PositionMode
instance ToPropValue (PageBreak a)
instance ToPropValue OverflowMode
instance ToPropValue ListStyle
instance ToPropValue ListPosition
instance Real a => ToPropValue (Length a)
instance HasLength Length
instance ToPropValue FontWeight
instance ToPropValue FontVariant
instance ToPropValue FontStyle
instance Real a => ToPropValue (FontSize a)
instance HasPercent FontSize
instance HasLength FontSize
instance ToPropValue FontFamily
instance IsString FontFamily
instance ToPropValue FloatEdge
instance (Real a, ToPropValue (len a)) => ToPropValue (FactorLen len a)
instance HasPercent (FactorLen len)
instance HasLength len => HasLength (FactorLen len)
instance HasAutoLength len => HasAutoLength (FactorLen len)
instance ToPropValue DisplayMode
instance ToPropValue url => ToPropValue (Cursor url)
instance ToPropValue (CssUrl Text)
instance IsString a => IsString (CssUrl a)
instance ToPropValue (CssString Text)
instance IsString a => IsString (CssString a)
instance ToPropValue url => ToPropValue (ContentPart url)
instance IsString (ContentPart url)
instance Real a => ToPropValue (ClipMode a)
instance ToPropValue CaptionSide
instance Real a => ToPropValue (BorderWidth a)
instance HasLength BorderWidth
instance ToPropValue BorderStyle
instance ToPropValue BackgroundRepeat
instance ToPropValue BackgroundAttachment
instance ToPropValue (len a) => ToPropValue (AutoLen len a)
instance HasPercent len => HasPercent (AutoLen len)
instance HasLength len => HasLength (AutoLen len)
instance HasAutoLength (AutoLen len)
module Data.CSS.Render
-- | Render the given stylesheet.
renderCSS :: Writer CSS a -> Builder
-- | Render the given stylesheet.
renderCSST :: Monad m => WriterT CSS m a -> m Builder
-- | Render the given raw stylesheet to a Builder.
fromCSS :: CSS -> Builder
module Data.CSS.Build
-- | Specify stylesheets for all media,
onAll :: Monad m => ReaderT (Set MediaType) m a -> m a
-- | Specify stylesheets for the given media.
onMedia :: Monad m => [MediaType] -> ReaderT (Set MediaType) m a -> m a
-- | Specify the selector.
select :: Monad m => [Selector] -> ReaderT BuildCfg m a -> ReaderT (Set MediaType) m a
-- | Given children of the current selector.
below :: MonadWriter CSS m => [Selector] -> m a -> m a
-- | Executes a computation in a modified environment.
local :: MonadReader r m => forall a. (r -> r) -> m a -> m a
-- | Set the given property to the given value. (infix 2)
--
-- Infix version of setProp.
($=) :: ToPropValue a => PropName -> a -> SetProp
-- | Mark all property values important.
important :: MonadWriter CSS m => m a -> m a
-- | Set the given property to be inherited.
inherit :: (MonadReader BuildCfg m, MonadWriter CSS m) => PropName -> m ()
-- | Set the given property to the given value.
--
-- Non-infix version of $=.
setProp :: ToPropValue a => PropName -> a -> SetProp
-- | Import the given style sheet for the given media type.
importFrom :: MonadWriter CSS m => MediaType -> Text -> m ()
-- | Import the given style sheet for the given media type.
importUrl :: (MonadRoute m, MonadWriter CSS m) => MediaType -> URL m -> m ()
module Data.CSS.Properties.Font
-- | Set the background-attachment.
backgroundAttachment :: BackgroundAttachment -> SetProp
-- | Set the background-color.
backgroundColor :: (ColourOps f, ToPropValue (f a)) => f a -> SetProp
-- | Set the background-image.
backgroundImage :: Maybe (CssUrl Text) -> SetProp
-- | Set the background-image.
backgroundImageUrl :: MonadRoute m => Maybe (URL m) -> SetPropM m
-- | Set the background-position.
backgroundPosition :: (Real a, Real b) => FactorLen Length a -> FactorLen Length b -> SetProp
-- | Set background-repeat.
backgroundRepeat :: BackgroundRepeat -> SetProp
-- | Set the foreground color.
color :: (ColourOps f, ToPropValue (f a)) => f a -> SetProp
-- | Set the font-family choices.
fontFamily :: [FontFamily] -> SetProp
-- | Set the font-size.
fontSize :: Real a => FontSize a -> SetProp
-- | Set the font-style.
fontStyle :: FontStyle -> SetProp
-- | Set the font-variant.
fontVariant :: FontVariant -> SetProp
-- | Set the font-weight.
fontWeight :: FontWeight -> SetProp
-- | Set the text-decoration.
textDecoration :: Maybe TextDecoration -> SetProp
module Data.CSS.Properties.Layout
-- | Set all border properties for all edges.
border :: (ColourOps f, Real a, ToPropValue (f b)) => BorderWidth a -> BorderStyle -> f b -> SetProp
-- | Set the border color for the given edges (border*-color).
borderColor :: (ColourOps f, ToPropValue (f a)) => Edge (f a) -> SetProp
-- | Set the border style for the given edges (border*-style).
borderStyle :: Edge BorderStyle -> SetProp
-- | Set the border width for the given edges (border*-width).
borderWidth :: Real a => Edge (BorderWidth a) -> SetProp
-- | Set the line-height to the given length or normal.
lineHeight :: Real a => Maybe (FactorLen Length a) -> SetProp
-- | Set the vertical-align mode.
verticalAlign :: Real a => VerticalAlign a -> SetProp
-- | Set the margin for the given edges (margin*).
margin :: Real a => Edge (AutoLen (FactorLen Length) a) -> SetProp
-- | Set the padding for the given edges (padding*).
padding :: Real a => Edge (FactorLen Length a) -> SetProp
-- | Specify the page margins for paged media.
pageMargins :: (MonadWriter CSS m, Real a) => PageSelector -> Edge (AutoLen (FactorLen Length) a) -> ReaderT (Set MediaType) m ()
-- | Set page breaking behaviour before the element
-- (page-break-before) to the given value or auto.
pageBreakBefore :: Maybe (PageBreak a) -> SetProp
-- | Set page breaking behaviour after the element
-- (page-break-after) to the given value or auto.
pageBreakAfter :: Maybe (PageBreak a) -> SetProp
-- | Set page breaking behaviour inside the element
-- (page-break-inside) to the given value or auto.
pageBreakInside :: Maybe (PageBreak InsideBreak) -> SetProp
-- | Set edge positions (top, right, bottom,
-- left).
edgePos :: Real a => Edge (AutoLen (FactorLen Length) a) -> SetProp
-- | Set the position mode.
position :: PositionMode -> SetProp
-- | Set the z-index to the given integer or auto.
zIndex :: Integral a => Maybe a -> SetProp
-- | Set the sides to clear.
clear :: [FloatEdge] -> SetProp
-- | Set float side.
float :: Maybe FloatEdge -> SetProp
-- | Set the height.
height :: Real a => AutoLen (FactorLen Length) a -> SetProp
-- | Set the min-height.
minHeight :: Real a => FactorLen Length a -> SetProp
-- | Set the max-height.
maxHeight :: Real a => Maybe (FactorLen Length a) -> SetProp
-- | Set the width.
width :: Real a => AutoLen (FactorLen Length) a -> SetProp
-- | Set the min-width.
minWidth :: Real a => FactorLen Length a -> SetProp
-- | Set the max-width.
maxWidth :: Real a => Maybe (FactorLen Length a) -> SetProp
-- | Collapse borders for tables (border-collapse)?
borderCollapse :: Bool -> SetProp
-- | Set the table's border-spacing (up to two values).
borderSpacing :: Real a => [Length a] -> SetProp
-- | Set the caption-side.
captionSide :: CaptionSide -> SetProp
-- | Show empty-cells?
emptyCells :: Bool -> SetProp
-- | Set the table-layout.
tableLayout :: TableLayout -> SetProp
-- | Set the clip mode to the given shape or auto.
clip :: Real a => Maybe (ClipMode a) -> SetProp
-- | Set the display mode.
display :: DisplayMode -> SetProp
-- | Set the overflow handling mode.
overflow :: OverflowMode -> SetProp
-- | Set the visibility mode.
visibility :: VisibilityMode -> SetProp
module Data.CSS.Properties.Text
-- | Set the letter-spacing to the specified value or
-- normal.
letterSpacing :: Real a => Maybe (Length a) -> SetProp
-- | Set text-align.
textAlign :: TextAlign -> SetProp
-- | Set the text-indent.
textIndent :: Real a => FactorLen Length a -> SetProp
-- | Set the white space collapse and text wrapping modes
-- (white-space).
whiteSpace :: TextWrapMode -> SetProp
-- | Set the word-spacing to the specified value or
-- normal.
wordSpacing :: Real a => Maybe (Length a) -> SetProp
-- | Set the text direction.
direction :: TextDirection -> SetProp
-- | Set the unicode-bidi mode.
unicodeBidi :: UnicodeBidiMode -> SetProp
-- | Set the generated content to the given list of parts or
-- normal.
content :: Maybe [ContentPart (CssUrl Text)] -> SetProp
-- | Set the generated content to the given list of parts or
-- normal.
contentUrl :: MonadRoute m => Maybe [ContentPart (URL m)] -> SetPropM m
-- | Increment the given counters by the given value
-- (counter-increment).
counterIncrement :: Integral a => [(ByteString, a)] -> SetProp
-- | Reset the given counters to the given value (counter-reset).
counterReset :: Integral a => [(ByteString, a)] -> SetProp
-- | Set the quotes pairs (none if empty).
quotes :: [(CssString Text, CssString Text)] -> SetProp
-- | Set all list-style properties.
listStyle :: ListStyle -> ListPosition -> Maybe (CssUrl Text) -> SetProp
-- | Set the list-style-image.
listStyleImage :: Maybe (CssUrl Text) -> SetProp
-- | Set the list-style-image.
listStyleImageUrl :: MonadRoute m => Maybe (URL m) -> SetPropM m
-- | Set the list-style-position.
listStylePosition :: ListPosition -> SetProp
-- | Set the list-style-type.
listStyleType :: ListStyle -> SetProp
-- | Set all list-style properties.
listStyleUrl :: MonadRoute m => ListStyle -> ListPosition -> Maybe (URL m) -> SetPropM m
-- | Set the orphans threshold (minimum number of lines at the
-- bottom of a page).
orphans :: Integral a => a -> SetProp
-- | Set the widows threshold (minimum number of lines at the top
-- of a page).
widows :: Integral a => a -> SetProp
-- | Set the text-transform.
textTransform :: Maybe TextTransform -> SetProp
module Data.CSS.Properties.UI
-- | Set the cursor to the specified value or auto.
cursor :: Maybe (Cursor (CssUrl Text)) -> SetProp
-- | Set the cursor to the specified value or auto.
cursorUrl :: MonadRoute m => Maybe (Cursor (URL m)) -> SetPropM m
-- | Set the outline properties.
outline :: (ColourOps f, Real b, ToPropValue (f a)) => Maybe (f a) -> BorderStyle -> BorderWidth b -> SetProp
-- | Set the outline-color to the given color or invert.
outlineColor :: (ColourOps f, ToPropValue (f a)) => Maybe (f a) -> SetProp
-- | Set the outline-style.
outlineStyle :: BorderStyle -> SetProp
-- | Set the outline-width.
outlineWidth :: Real a => BorderWidth a -> SetProp
module Data.CSS.Properties
-- | This library implements a domain-specific language for cascading style
-- sheets as used in web pages. It allows you to specify your style
-- sheets in regular Haskell syntax and gives you all the additional
-- power of server-side document generation.
module Data.CSS