diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,16 @@
 CHANGELOG
 
+  0.15.0:
+    - Add `all` media type.
+    - Support `prefers-color-scheme` media feature.
+    - Use `matrix` rather than `matrix3d`
+    - Add media type `all`
+    - Add some relative units
+    - Add CSS properties related to hyphenation
+    - Use `Number` type instead of `Double` as an argument type in many places
+    - Fix rendering of `Number` type
+    Thanks to Yoo Chung, Charles Bayley and David Fox
+
   0.14.0:
     - Drop support for GHC 8.2
     - Added `text-align-last`
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # Clay
 
-[![Build Status](https://travis-ci.org/sebastiaanvisser/clay.png)](https://travis-ci.org/sebastiaanvisser/clay)
+[![build](https://github.com/sebastiaanvisser/clay/actions/workflows/ci.yml/badge.svg)](https://github.com/sebastiaanvisser/clay/actions/workflows/ci.yml)
 [![Hackage](https://img.shields.io/hackage/v/clay.svg)](https://hackage.haskell.org/package/clay)
 
 Clay is a CSS preprocessor like LESS and Sass, but implemented as an embedded
diff --git a/clay.cabal b/clay.cabal
--- a/clay.cabal
+++ b/clay.cabal
@@ -1,5 +1,5 @@
 Name:     clay
-Version:  0.14.0
+Version:  0.15.0
 Synopsis: CSS preprocessor as embedded Haskell.
 Description:
   Clay is a CSS preprocessor like LESS and Sass, but implemented as an embedded
@@ -31,7 +31,9 @@
   GHC==8.6.5,
   GHC==8.8.4,
   GHC==8.10.7,
-  GHC==9.0.2
+  GHC==9.0.2,
+  GHC==9.2.2,
+  GHC==9.4.2
 
 Source-Repository head
   Type:     git
@@ -75,7 +77,7 @@
     Clay.Transition
 
   Build-Depends:
-    base  >= 4.11 && < 4.16,
+    base  >= 4.11 && < 4.20,
     mtl   >= 1,
     text  >= 0.11
   GHC-Options: -Wall -Wcompat
@@ -87,7 +89,7 @@
   Build-Tools: hspec-discover
   main-is: Spec.hs
   Build-Depends:
-    base                 >= 4.11  && < 4.16,
+    base                 >= 4.11  && < 4.20,
     mtl                  >= 1,
     text                 >= 0.11,
     hspec                >= 2.2.0,
diff --git a/src/Clay/Animation.hs b/src/Clay/Animation.hs
--- a/src/Clay/Animation.hs
+++ b/src/Clay/Animation.hs
@@ -142,7 +142,7 @@
 infinite :: IterationCount
 infinite = IterationCount "infinite"
 
-iterationCount :: Double -> IterationCount
+iterationCount :: Number -> IterationCount
 iterationCount = IterationCount . value
 
 -------------------------------------------------------------------------------
diff --git a/src/Clay/Display.hs b/src/Clay/Display.hs
--- a/src/Clay/Display.hs
+++ b/src/Clay/Display.hs
@@ -209,7 +209,7 @@
 
 -------------------------------------------------------------------------------
 
-opacity :: Double -> Css
+opacity :: Number -> Css
 opacity = key "opacity"
 
 zIndex :: Integer -> Css
diff --git a/src/Clay/Filter.hs b/src/Clay/Filter.hs
--- a/src/Clay/Filter.hs
+++ b/src/Clay/Filter.hs
@@ -52,7 +52,7 @@
 blur :: Size LengthUnit -> Filter
 blur i = Filter ("blur(" <> value i <> ")")
 
-brightness :: Double -> Filter
+brightness :: Number -> Filter
 brightness i = Filter ("brightness(" <> value i <> ")")
 
 contrast :: Size Percentage -> Filter
diff --git a/src/Clay/Media.hs b/src/Clay/Media.hs
--- a/src/Clay/Media.hs
+++ b/src/Clay/Media.hs
@@ -4,9 +4,13 @@
 
 -- * Media types.
 
-  aural, braille, handheld, print, projection
-, screen, tty, tv, embossed
+  all, screen, print
 
+-- ** Deprecated.
+
+-- | These media types were deprecated by Media Queries 4.
+, aural, braille, handheld, projection, tty, tv, embossed
+
 -- * Geometrical features.
 
 , width, minWidth, maxWidth, height, minHeight, maxHeight, deviceWidth
@@ -33,6 +37,16 @@
 , Resolution
 , dpi
 , dppx
+
+-- * Preference related features.
+
+, prefersColorScheme
+
+-- ** Preference related values.
+
+, ColorScheme
+, light
+, dark
 )
 
 where
@@ -40,7 +54,7 @@
 import Data.Text (Text, pack)
 import Data.Monoid
 
-import Clay.Common
+import Clay.Common hiding (all)
 import Clay.Size
 import Clay.Property
 import Clay.Stylesheet
@@ -49,14 +63,18 @@
 
 -------------------------------------------------------------------------------
 
-aural, braille, handheld, print, projection
+all, aural, braille, handheld, print, projection
   , screen, tty, tv, embossed :: MediaType
 
+-- | Suitable for all devices.
+all        = MediaType "all"
 aural      = MediaType "aural"
 braille    = MediaType "braille"
 handheld   = MediaType "handheld"
+-- | Intended primarily for printed material or in a print layout.
 print      = MediaType "print"
 projection = MediaType "projection"
+-- | Intended primarily for screen-based devices.
 screen     = MediaType "screen"
 tty        = MediaType "tty"
 tv         = MediaType "tv"
@@ -132,3 +150,21 @@
 dppx :: Integer -> Resolution
 dppx i = Resolution (value (pack (show i) <> "dppx"))
 
+-------------------------------------------------------------------------------
+
+-- | Feature detecting whether user prefers light or dark color scheme.
+prefersColorScheme :: ColorScheme -> Feature
+prefersColorScheme = with "prefers-color-scheme"
+
+-- | A color scheme preferred by a user.
+newtype ColorScheme = ColorScheme Value
+  deriving (Val, Other)
+
+-- | User indicates that they prefer a light theme with their interface,
+-- or that they have not indicated a preference.
+light :: ColorScheme
+light = ColorScheme (value (pack "light"))
+
+-- | User indicates that they prefer a dark theme with their interface.
+dark :: ColorScheme
+dark = ColorScheme (value (pack "dark"))
diff --git a/src/Clay/Property.hs b/src/Clay/Property.hs
--- a/src/Clay/Property.hs
+++ b/src/Clay/Property.hs
@@ -71,15 +71,6 @@
 data E5 = E5
 instance HasResolution E5 where resolution _ = 100000
 
-instance Val Double where
-  value = Value . Plain . cssDoubleText
-
-cssDoubleText :: Double -> Text
-cssDoubleText = fromString . showFixed' . realToFrac
-    where
-      showFixed' :: Fixed E5 -> String
-      showFixed' = showFixed True
-
 instance Val Value where
   value = id
 
@@ -103,6 +94,19 @@
 intercalate :: Monoid a => a -> [a] -> a
 intercalate _ []     = mempty
 intercalate s (x:xs) = foldl (\a b -> a `mappend` s `mappend` b) x xs
+
+-------------------------------------------------------------------------------
+
+-- | A number type to represent the CSS @number@ type.
+--   It has fixed precision, supporting up to 5 decimal places.
+newtype Number = Number { unNumber :: Fixed E5 }
+  deriving (Enum, Eq, Fractional, Num, Ord, Read, Real, RealFrac, Show)
+
+instance Val Number where
+  value = Value . Plain . cssNumberText
+
+cssNumberText :: Number -> Text
+cssNumberText = fromString . showFixed True . unNumber
 
 -------------------------------------------------------------------------------
 
diff --git a/src/Clay/Render.hs b/src/Clay/Render.hs
--- a/src/Clay/Render.hs
+++ b/src/Clay/Render.hs
@@ -16,7 +16,7 @@
 import           Control.Monad.Writer
 import           Data.List              (sort)
 import           Data.Maybe
-import           Data.Text              (Text, pack)
+import           Data.Text              (Text)
 import           Data.Text.Lazy.Builder
 import           Prelude                hiding ((**))
 
@@ -147,10 +147,10 @@
     )
     (unPrefixed browsers)
 
-frame :: Config -> (Double, [Rule]) -> Builder
+frame :: Config -> (Number, [Rule]) -> Builder
 frame cfg (p, rs) =
   mconcat
-    [ fromText (pack (show p))
+    [ fromText (cssNumberText p)
     , "% "
     , rules cfg [] rs
     ]
@@ -184,7 +184,7 @@
 feature :: Feature -> Builder
 feature (Feature k mv) =
   case mv of
-    Nothing        -> fromText k
+    Nothing        -> mconcat [ "(", fromText k, ")" ]
     Just (Value v) -> mconcat
       [ "(" , fromText k , ": " , fromText (plain v) , ")" ]
 
diff --git a/src/Clay/Size.hs b/src/Clay/Size.hs
--- a/src/Clay/Size.hs
+++ b/src/Clay/Size.hs
@@ -27,12 +27,23 @@
 , pc
 , em
 , ex
+, ch
 , pct
 , rem
+, lh
+, rlh
 , vw
 , vh
 , vmin
 , vmax
+, vb
+, vi
+, svw
+, svh
+, lvw
+, lvh
+, dvw
+, dvh
 , fr
 , maxContent
 , minContent
@@ -94,8 +105,8 @@
   SimpleSize Text |
   forall b c. SumSize (Size b) (Size c) |
   forall b c. DiffSize (Size b) (Size c) |
-  MultSize Double (Size a) |
-  DivSize Double (Size a) |
+  MultSize Number (Size a) |
+  DivSize Number (Size a) |
   OtherSize Value
 
 deriving instance Show (Size a)
@@ -104,8 +115,8 @@
 sizeToText (SimpleSize txt) = txt
 sizeToText (SumSize a b) = mconcat ["(", sizeToText a, " + ", sizeToText b, ")"]
 sizeToText (DiffSize a b) = mconcat ["(", sizeToText a, " - ", sizeToText b, ")"]
-sizeToText (MultSize a b) = mconcat ["(", cssDoubleText a, " * ", sizeToText b, ")"]
-sizeToText (DivSize a b) = mconcat ["(", sizeToText b, " / ", cssDoubleText a, ")"]
+sizeToText (MultSize a b) = mconcat ["(", cssNumberText a, " * ", sizeToText b, ")"]
+sizeToText (DivSize a b) = mconcat ["(", sizeToText b, " / ", cssNumberText a, ")"]
 sizeToText (OtherSize a) = plain $ unValue a
 
 instance Val (Size a) where
@@ -124,54 +135,87 @@
 nil = SimpleSize "0"
 
 -- | Unitless size (as recommended for line-height).
-unitless :: Double -> Size a
+unitless :: Number -> Size a
 unitless i = SimpleSize ((plain . unValue . value) i)
 
-cm, mm, inches, px, pt, pc :: Double -> Size LengthUnit
+cm, mm, inches, px, pt, pc :: Number -> Size LengthUnit
 
 -- | Size in centimeters.
-cm i = SimpleSize (cssDoubleText i <> "cm")
+cm i = SimpleSize (cssNumberText i <> "cm")
 
 -- | Size in millimeters.
-mm i = SimpleSize (cssDoubleText i <> "mm")
+mm i = SimpleSize (cssNumberText i <> "mm")
 
 -- | Size in inches (1in = 2.54 cm).
-inches i = SimpleSize (cssDoubleText i <> "in")
+inches i = SimpleSize (cssNumberText i <> "in")
 
 -- | Size in pixels.
-px i = SimpleSize (cssDoubleText i <> "px")
+px i = SimpleSize (cssNumberText i <> "px")
 
 -- | Size in points (1pt = 1/72 of 1in).
-pt i = SimpleSize (cssDoubleText i <> "pt")
+pt i = SimpleSize (cssNumberText i <> "pt")
 
 -- | Size in picas (1pc = 12pt).
-pc i = SimpleSize (cssDoubleText i <> "pc")
+pc i = SimpleSize (cssNumberText i <> "pc")
 
-em, ex, rem, vw, vh, vmin, vmax, fr :: Double -> Size LengthUnit
+em, ex, ch, rem, lh, rlh, vw, vh, vmin, vmax, vb, vi, svw, svh, lvw, lvh, dvw, dvh, fr :: Number -> Size LengthUnit
 
--- | Size in em's (computed cssDoubleText of the font-size).
-em i = SimpleSize (cssDoubleText i <> "em")
+-- | Size in em's (computed cssNumberText of the font-size).
+em i = SimpleSize (cssNumberText i <> "em")
 
 -- | SimpleSize in ex'es (x-height of the first avaliable font).
-ex i = SimpleSize (cssDoubleText i <> "ex")
+ex i = SimpleSize (cssNumberText i <> "ex")
 
+-- | SimpleSize in ch's (The width of the glyph "0" of the element's font).
+ch i = SimpleSize (cssNumberText i <> "ch")
+
 -- | SimpleSize in rem's (em's, but always relative to the root element).
-rem i = SimpleSize (cssDoubleText i <> "rem")
+rem i = SimpleSize (cssNumberText i <> "rem")
 
+-- | SimpleSize in lh's (Line height of the element).
+lh i = SimpleSize (cssNumberText i <> "lh")
+
+-- | SimpleSize in rlh's (lh's, but always relative to the root element).
+rlh i = SimpleSize (cssNumberText i <> "rlh")
+
 -- | SimpleSize in vw's (1vw = 1% of viewport width).
-vw i = SimpleSize (cssDoubleText i <> "vw")
+vw i = SimpleSize (cssNumberText i <> "vw")
 
 -- | SimpleSize in vh's (1vh = 1% of viewport height).
-vh i = SimpleSize (cssDoubleText i <> "vh")
+vh i = SimpleSize (cssNumberText i <> "vh")
 
 -- | SimpleSize in vmin's (the smaller of vw or vh).
-vmin i = SimpleSize (cssDoubleText i <> "vmin")
+vmin i = SimpleSize (cssNumberText i <> "vmin")
 
 -- | SimpleSize in vmax's (the larger of vw or vh).
-vmax i = SimpleSize (cssDoubleText i <> "vmax")
+vmax i = SimpleSize (cssNumberText i <> "vmax")
 
+-- | SimpleSize in vb's (1vb = 1% of the parent's size in the direction of the root element's block axis).
+vb i = SimpleSize (cssNumberText i <> "vb")
+
+-- | SimpleSize in vi's (1vi = 1% of the parent's size in the direction of the root element's inline axis).
+vi i = SimpleSize (cssNumberText i <> "vi")
+
+-- | SimpleSize in svw's (1svw = 1% of the small viewport's width).
+svw i = SimpleSize (cssNumberText i <> "svw")
+
+-- | SimpleSize in svh's (1svh = 1% of the small viewport's height).
+svh i = SimpleSize (cssNumberText i <> "svh")
+
+-- | SimpleSize in lvw's (1lvw = 1% of the large viewport's width).
+lvw i = SimpleSize (cssNumberText i <> "lvw")
+
+-- | SimpleSize in lvh's (1lvh = 1% of the large viewport's height).
+lvh i = SimpleSize (cssNumberText i <> "lvh")
+
+-- | SimpleSize in dvw's (1dvw = 1% of the dynamic viewport's width).
+dvw i = SimpleSize (cssNumberText i <> "dvw")
+
+-- | SimpleSize in dvh's (1dvh = 1% of the dynamic viewport's height).
+dvh i = SimpleSize (cssNumberText i <> "dvh")
+
 -- | 'SimpleSize' in fr's (a fractional unit and 1fr is for 1 part of the available space in grid areas).
-fr i = SimpleSize (cssDoubleText i <> "fr")
+fr i = SimpleSize (cssNumberText i <> "fr")
 
 -- | SimpleSize for the intrinsic preferred width.
 maxContent :: Size LengthUnit
@@ -190,8 +234,8 @@
 fitContent = SimpleSize "fit-content"
 
 -- | SimpleSize in percents.
-pct :: Double -> Size Percentage
-pct i = SimpleSize (cssDoubleText i <> "%")
+pct :: Number -> Size Percentage
+pct i = SimpleSize (cssNumberText i <> "%")
 
 instance Num (Size LengthUnit) where
   fromInteger = px . fromInteger
@@ -236,17 +280,17 @@
 
 -- | Times operator to combine sizes into calc function
 infixl 7 *@
-(*@) :: Double -> Size a -> Size a
+(*@) :: Number -> Size a -> Size a
 a *@ b = MultSize a b
 
 -- | Reversed times operator to combine sizes into calc function
 infixl 7 @*
-(@*) :: Size a -> Double -> Size a
+(@*) :: Size a -> Number -> Size a
 a @* b = MultSize b a
 
 -- | Division operator to combine sizes into calc function
 infixl 7 @/
-(@/) :: Size a -> Double -> Size a
+(@/) :: Size a -> Number -> Size a
 a @/ b = DivSize b a
 
 -------------------------------------------------------------------------------
@@ -271,19 +315,19 @@
   deriving (Val, Auto, Inherit, Other)
 
 -- | Angle in degrees.
-deg :: Double -> Angle Deg
+deg :: Number -> Angle Deg
 deg i = Angle (value i <> "deg")
 
 -- | Angle in radians.
-rad :: Double -> Angle Rad
+rad :: Number -> Angle Rad
 rad i = Angle (value i <> "rad")
 
 -- | Angle in gradians (also knows as gons or grades).
-grad :: Double -> Angle Grad
+grad :: Number -> Angle Grad
 grad i = Angle (value i <> "grad")
 
 -- | Angle in turns.
-turn :: Double -> Angle Turn
+turn :: Number -> Angle Turn
 turn i = Angle (value i <> "turn")
 
 instance Num (Angle Deg) where
diff --git a/src/Clay/Stylesheet.hs b/src/Clay/Stylesheet.hs
--- a/src/Clay/Stylesheet.hs
+++ b/src/Clay/Stylesheet.hs
@@ -55,7 +55,7 @@
   | Sub    Selector
   deriving Show
 
-data Keyframes = Keyframes Text [(Double, [Rule])]
+data Keyframes = Keyframes Text [(Number, [Rule])]
   deriving Show
 
 data Rule
@@ -165,7 +165,7 @@
 
 -------------------------------------------------------------------------------
 
-keyframes :: Text -> [(Double, Css)] -> Css
+keyframes :: Text -> [(Number, Css)] -> Css
 keyframes n xs = rule $ Keyframe (Keyframes n (map (second runS) xs))
 
 keyframesFromTo :: Text -> Css -> Css -> Css
diff --git a/src/Clay/Text.hs b/src/Clay/Text.hs
--- a/src/Clay/Text.hs
+++ b/src/Clay/Text.hs
@@ -73,14 +73,24 @@
 , wordBreak
 , breakAll
 , keepAll
-  
+
 -- * Overflow-wrap (and Word-wrap).
 
 , OverflowWrap
 , overflowWrap
 , wordWrap
 , breakWord
-  
+
+-- * Hyphenation.
+
+, hyphens
+, hyphenateCharacter
+, hyphenateLimitChars
+, manual
+, Hyphens
+, HyphenateCharacter
+, HyphenateLimit
+
 -- * Content.
 
 , Content
@@ -96,7 +106,7 @@
 where
 
 import Data.String
-import Data.Text (Text)
+import Data.Text (Text, pack)
 
 import Clay.Background
 import Clay.Border
@@ -305,6 +315,96 @@
 
 textOverflow :: TextOverflow -> Css
 textOverflow = key "text-overflow"
+
+-------------------------------------------------------------------------------
+
+-- | Type for values which can be provided to 'hyphens'.
+newtype Hyphens = Hyphens Value
+  deriving (Val, None, Auto, Initial, Inherit, Unset, Other)
+
+-- | Specifies how words should be hyphenated.
+--
+-- Possible values are:
+--
+--  ['none']: No hyphenation.
+--  Words will not be hyphenated even if it is explicitly suggested for a word.
+--
+--  ['manual']: Manual hyphenation.
+--  Specific characters such as @&shy;@ in a word will suggest break points.
+--  This is the default.
+--
+--  ['auto']: Automatic hyphenation.
+--  The browser is free to hyphenate words as it sees fit.
+--  However, explicitly suggested break points will take precedence.
+--
+-- For example,
+--
+-- >>> hyphens auto
+--
+-- The hyphenation rules depend on the language,
+-- which must be specified by the @lang@ attribute.
+--
+-- For reference, see
+-- [@hyphens@](https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens).
+hyphens :: Hyphens -> Css
+hyphens = key "hyphens"
+
+-- | Value for 'hyphens' specifying that hyphenation be manual.
+manual :: Hyphens
+manual = Hyphens "manual"
+-- 'manual' feels like it should be a function and type class in Clay.Common,
+-- but @hyphens@ is the only CSS property which uses it as a specified value.
+
+-- | Type for values which can be provided to 'hyphenateCharacter'.
+newtype HyphenateCharacter = HyphenateCharacter Value
+  deriving (Val, Auto, Initial, Inherit, Unset, Other)
+
+-- Allow a 'HyphenateCharacter' value to be specified directly with a string.
+instance IsString HyphenateCharacter where
+  fromString = HyphenateCharacter . Value . Plain . quote . pack
+
+-- | Customizes the character used for hyphenation.
+--
+-- For example,
+--
+-- >>> hyphenateCharacter "~"
+--
+-- For reference, see
+-- [@hyphenate-character@](https://developer.mozilla.org/en-US/docs/Web/CSS/hyphenate-character).
+hyphenateCharacter :: HyphenateCharacter -> Css
+hyphenateCharacter = key "hyphenate-character"
+
+-- | Type for values which can be provded to 'hyphenateLimitChars'.
+newtype HyphenateLimit = HyphenateLimit Value
+  deriving (Val, Auto, Initial, Inherit, Unset, Other)
+
+-- Allow a 'HyphenateLimit' value to be specified directly with a number.
+instance Num HyphenateLimit where
+  fromInteger = HyphenateLimit . value
+  (+) = error "plus not implemented for HyphenateLimit"
+  (*) = error "times not implemented for HyphenateLimit"
+  abs = error "abs not implemented for HyphenateLimit"
+  signum = error "signum not implemented for HyphenateLimit"
+  negate = error "negate not implemented for HyphenateLimit"
+
+-- | Adjusts the minumum number of characters involved in hyphenation.
+--
+-- I.e., specifies the minumum number of characters allowed in a breakable word,
+-- before a break point, and after a break point when hyphenating a word.
+--
+-- For example,
+--
+-- >>> hyphenateLimitChars 14 auto auto
+--
+-- For reference, see
+-- [@hyphenate-limit-chars@](https://developer.mozilla.org/en-US/docs/Web/CSS/hyphenate-limit-chars).
+hyphenateLimitChars
+  :: HyphenateLimit -- ^ Minimum length of a word which can be hyphenated.
+  -> HyphenateLimit -- ^ Minimum number of characters allowed before a break point.
+  -> HyphenateLimit -- ^ Minimum number of characters allowed after a break point.
+  -> Css
+hyphenateLimitChars word before after =
+  key "hyphenate-limit-chars" (word ! before ! after)
 
 -------------------------------------------------------------------------------
 
diff --git a/src/Clay/Transform.hs b/src/Clay/Transform.hs
--- a/src/Clay/Transform.hs
+++ b/src/Clay/Transform.hs
@@ -101,16 +101,16 @@
 
 -------------------------------------------------------------------------------
 
-scale :: Double -> Double -> Transformation
+scale :: Number -> Number -> Transformation
 scale x y = Transformation ("scale(" <> value [x, y] <> ")")
 
-scaleX, scaleY, scaleZ :: Double -> Transformation
+scaleX, scaleY, scaleZ :: Number -> Transformation
 
 scaleX x = Transformation ("scaleX(" <> value x <> ")")
 scaleY y = Transformation ("scaleY(" <> value y <> ")")
 scaleZ z = Transformation ("scaleZ(" <> value z <> ")")
 
-scale3d :: Double -> Double -> Double -> Transformation
+scale3d :: Number -> Number -> Number -> Transformation
 scale3d x y z = Transformation ("scale3d(" <> value [x, y, z] <> ")")
 
 -------------------------------------------------------------------------------
@@ -124,7 +124,7 @@
 rotateY y = Transformation ("rotateY(" <> value y <> ")")
 rotateZ z = Transformation ("rotateZ(" <> value z <> ")")
 
-rotate3d :: Double -> Double -> Double -> Angle a -> Transformation
+rotate3d :: Number -> Number -> Number -> Angle a -> Transformation
 rotate3d x y z a = Transformation ("rotate3d(" <> value [value x, value y, value z, value a] <> ")")
 
 -------------------------------------------------------------------------------
@@ -154,16 +154,16 @@
 
 -------------------------------------------------------------------------------
 
-perspective :: Double -> Transformation
+perspective :: Number -> Transformation
 perspective p = Transformation ("perspective(" <> value p <> ")")
 
-matrix :: Double -> Double -> Double -> Double -> Double -> Double -> Transformation
-matrix u v w x y z = Transformation ("matrix3d(" <> value [ u, v, w, x, y, z ] <> ")")
+matrix :: Number -> Number -> Number -> Number -> Number -> Number -> Transformation
+matrix u v w x y z = Transformation ("matrix(" <> value [ u, v, w, x, y, z ] <> ")")
 
-matrix3d :: Double -> Double -> Double -> Double
-         -> Double -> Double -> Double -> Double
-         -> Double -> Double -> Double -> Double
-         -> Double -> Double -> Double -> Double
+matrix3d :: Number -> Number -> Number -> Number 
+         -> Number -> Number -> Number -> Number
+         -> Number -> Number -> Number -> Number
+         -> Number -> Number -> Number -> Number
          -> Transformation
 matrix3d w0 x0 y0 z0
          w1 x1 y1 z1
diff --git a/src/Clay/Transition.hs b/src/Clay/Transition.hs
--- a/src/Clay/Transition.hs
+++ b/src/Clay/Transition.hs
@@ -92,7 +92,7 @@
 stepsStart s = other ("steps(" <> value s <> ", start)")
 stepsStop  s = other ("steps(" <> value s <> ", end)")
 
-cubicBezier :: Double -> Double -> Double -> Double -> TimingFunction
+cubicBezier :: Number -> Number -> Number -> Number -> TimingFunction
 cubicBezier a b c d = other ("cubic-bezier(" <> value [a, b, c, d] <> ")")
 
 transitionTimingFunction :: TimingFunction -> Css
