Copyright | (c) 2017 Cristian Adrián Ontivero |
---|---|
License | BSD3 |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
CSS Dimension data types: <length>, <angle>, <time>, <frequency>, and <resolution>. Provides conversion of absolute dimensions into other equivalent dimensions.
Synopsis
- data Length
- data LengthUnit
- data Angle
- data AngleUnit
- data Time = Time Number TimeUnit
- data TimeUnit
- data Frequency = Frequency Number FrequencyUnit
- data FrequencyUnit
- data Resolution = Resolution Number ResolutionUnit
- data ResolutionUnit
- toInches :: Number -> LengthUnit -> Number
- toPixels :: Number -> LengthUnit -> Number
- toRadians :: Number -> AngleUnit -> Number
- isRelative :: LengthUnit -> Bool
- isRelativeLength :: Length -> Bool
- isZeroLen :: Length -> Bool
- isZeroAngle :: Angle -> Bool
Documentation
The <length> CSS data type
data LengthUnit Source #
Instances
Bounded LengthUnit Source # | |
Defined in Hasmin.Types.Dimension minBound :: LengthUnit # maxBound :: LengthUnit # | |
Enum LengthUnit Source # | |
Defined in Hasmin.Types.Dimension succ :: LengthUnit -> LengthUnit # pred :: LengthUnit -> LengthUnit # toEnum :: Int -> LengthUnit # fromEnum :: LengthUnit -> Int # enumFrom :: LengthUnit -> [LengthUnit] # enumFromThen :: LengthUnit -> LengthUnit -> [LengthUnit] # enumFromTo :: LengthUnit -> LengthUnit -> [LengthUnit] # enumFromThenTo :: LengthUnit -> LengthUnit -> LengthUnit -> [LengthUnit] # | |
Eq LengthUnit Source # | |
Defined in Hasmin.Types.Dimension (==) :: LengthUnit -> LengthUnit -> Bool # (/=) :: LengthUnit -> LengthUnit -> Bool # | |
Show LengthUnit Source # | |
Defined in Hasmin.Types.Dimension showsPrec :: Int -> LengthUnit -> ShowS # show :: LengthUnit -> String # showList :: [LengthUnit] -> ShowS # | |
ToText LengthUnit Source # | |
Defined in Hasmin.Types.Dimension toText :: LengthUnit -> Text Source # toBuilder :: LengthUnit -> Builder Source # |
The <angle> CSS data type
Instances
Bounded AngleUnit Source # | |
Enum AngleUnit Source # | |
Defined in Hasmin.Types.Dimension succ :: AngleUnit -> AngleUnit # pred :: AngleUnit -> AngleUnit # fromEnum :: AngleUnit -> Int # enumFrom :: AngleUnit -> [AngleUnit] # enumFromThen :: AngleUnit -> AngleUnit -> [AngleUnit] # enumFromTo :: AngleUnit -> AngleUnit -> [AngleUnit] # enumFromThenTo :: AngleUnit -> AngleUnit -> AngleUnit -> [AngleUnit] # | |
Eq AngleUnit Source # | |
Show AngleUnit Source # | |
ToText AngleUnit Source # | |
The <time> CSS data type
Instances
Bounded TimeUnit Source # | |
Enum TimeUnit Source # | |
Eq TimeUnit Source # | |
Show TimeUnit Source # | |
ToText TimeUnit Source # | |
The <frequency> CSS data type
data FrequencyUnit Source #
Instances
data Resolution Source #
The <resolution> CSS data type
Instances
Eq Resolution Source # | |
Defined in Hasmin.Types.Dimension (==) :: Resolution -> Resolution -> Bool # (/=) :: Resolution -> Resolution -> Bool # | |
Show Resolution Source # | |
Defined in Hasmin.Types.Dimension showsPrec :: Int -> Resolution -> ShowS # show :: Resolution -> String # showList :: [Resolution] -> ShowS # | |
ToText Resolution Source # | |
Defined in Hasmin.Types.Dimension toText :: Resolution -> Text Source # toBuilder :: Resolution -> Builder Source # | |
Minifiable Resolution Source # | |
Defined in Hasmin.Types.Dimension minify :: Resolution -> Reader Config Resolution Source # |
data ResolutionUnit Source #
Instances
isRelative :: LengthUnit -> Bool Source #
isRelativeLength :: Length -> Bool Source #
isZeroAngle :: Angle -> Bool Source #