hasmin-0.3.3: CSS Minifier

Copyright(c) 2017 Cristian Adrián Ontivero
Safe HaskellNone



CSS Numeric data types: <number>, <percentage>, and <alphavalue>. All Rational newtypes to ensure dimension conversion precision.



newtype Percentage Source #

The <percentage> data type. Many CSS properties can take percentage values, often to define sizes in terms of parent objects. Percentages are formed by a <number> immediately followed by the percentage sign %. There is no space between the % and the number. Specification:

  1. <https://drafts.csswg.org/css-values-3/#percentages CSS Value and Units Module Level 3 (§4.3)
  2. <https://www.w3.org/TR/CSS2/syndata.html#percentage-units CSS2.1 (§4.3.3)
  3. <https://www.w3.org/TR/CSS1/#percentage-units CSS1 (§6.2)


Percentage Rational 


Eq Percentage Source # 
Fractional Percentage Source # 
Num Percentage Source # 
Ord Percentage Source # 
Real Percentage Source # 
RealFrac Percentage Source # 
Show Percentage Source # 
ToText Percentage Source # 

newtype Number Source #

The <number> data type. Real numbers, possibly with a fractional component. When written literally, a number is either an integer, or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits and optionally an exponent composed of "e" or E and an integer. It corresponds to the <number-token> production in the CSS Syntax Module [CSS3SYN]. As with integers, the first character of a number may be immediately preceded by - or + to indicate the number’s sign. Specifications:

  1. CSS Values and Units Module Level 3 (§4.2)
  2. CSS2.1 (§4.3.1)
  3. CSS1 (6 Units)



toNumber :: Real a => a -> Number Source #

newtype Alphavalue Source #

The <alphavalue> data type. Syntactically a <number>. It is the uniform opacity setting to be applied across an entire object. Any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) are clamped to this range. Specification:

  1. <https://www.w3.org/TR/css3-color/#transparency CSS Color Module Level 3 (§3.2)


Alphavalue Rational 


Bounded Alphavalue Source # 
Eq Alphavalue Source # 
Fractional Alphavalue Source # 
Num Alphavalue Source # 
Ord Alphavalue Source # 
Real Alphavalue Source # 
RealFrac Alphavalue Source # 
Show Alphavalue Source # 
ToText Alphavalue Source #