hasmin-1.0.2.1: CSS Minifier

Copyright(c) 2017 Cristian Adrián Ontivero
LicenseBSD3
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Hasmin.Types.Stylesheet

Description

 
Synopsis

Documentation

data MediaQuery Source #

Data type for media queries. For the syntax, see media query syntax.

Constructors

MediaQuery1 Text Text [Expression]

First possibility in the grammar

MediaQuery2 [Expression]

Second possibility in the grammar

data Rule Source #

A CSS rule, either a normal style rule, or one of the many possible at-rules.

Instances
Eq Rule Source # 
Instance details

Defined in Hasmin.Types.Stylesheet

Methods

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

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

Show Rule Source # 
Instance details

Defined in Hasmin.Types.Stylesheet

Methods

showsPrec :: Int -> Rule -> ShowS #

show :: Rule -> String #

showList :: [Rule] -> ShowS #

ToText Rule Source # 
Instance details

Defined in Hasmin.Types.Stylesheet

Minifiable Rule Source # 
Instance details

Defined in Hasmin.Types.Stylesheet

Minifiable [Rule] Source # 
Instance details

Defined in Hasmin.Types.Stylesheet

Methods

minify :: [Rule] -> Reader Config [Rule] Source #

collapse :: [Declaration] -> [Declaration] Source #

Given a list of declarations, gathers the longhands, and if every longhand of a given shorthand is present, "collapses" them into the shorthand (i.e. replaces all the declarations for an equivalent shorthand).