hasmin-1.0.2.1: CSS Minifier

Copyright(c) 2017 Cristian Adrián Ontivero
LicenseBSD3
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Hasmin.Types.Numeric

Description

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

Synopsis

Documentation

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)

Constructors

Percentage Rational 
Instances
Eq Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

Fractional Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

Num Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

Ord Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

Real Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

RealFrac Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

Show Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

ToText Percentage Source # 
Instance details

Defined in Hasmin.Types.Numeric

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)

Constructors

Number 
Instances
Eq Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

Methods

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

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

Fractional Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

Num Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

Ord Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

Real Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

RealFrac Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

Methods

properFraction :: Integral b => Number -> (b, Number) #

truncate :: Integral b => Number -> b #

round :: Integral b => Number -> b #

ceiling :: Integral b => Number -> b #

floor :: Integral b => Number -> b #

Show Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

ToText Number Source # 
Instance details

Defined in Hasmin.Types.Numeric

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)

Constructors

Alphavalue Rational 
Instances
Bounded Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

Eq Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

Fractional Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

Num Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

Ord Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

Real Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

RealFrac Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

Show Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric

ToText Alphavalue Source # 
Instance details

Defined in Hasmin.Types.Numeric