--- factorcss/CSS.hs 2005/02/12 13:31:23 72 +++ factorcss/CSS.hs 2005/02/27 13:53:48 73 @@ -2,13 +2,14 @@ -- This file is part of FactorCSS -- Licensed under the MIT License, -- http://www.opensource.org/licenses/mit-license --- Copyright 2004 James Bursa +-- Copyright 2005 James Bursa -- -- Datatypes for CSS module CSS where import List +import Numeric data Stylesheet = Stylesheet @@ -146,11 +147,11 @@ show_values = concat . intersperse " " . map show_value show_value :: Value -> String -show_value (Number n) = show n -show_value (Percentage p) = show p ++ "%" +show_value (Number n) = showFFloat Nothing n "" +show_value (Percentage p) = showFFloat Nothing p "%" show_value (Length l) = l -show_value (Ems e) = show e ++ "em" -show_value (Exs x) = show x ++ "ex" +show_value (Ems e) = showFFloat Nothing e "em" +show_value (Exs x) = showFFloat Nothing x "ex" show_value (Angle a) = a show_value (Time t) = t show_value (Freq f) = f