/[james]/factorcss/CSS.hs
ViewVC logotype

Diff of /factorcss/CSS.hs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 72 by james, Sat Feb 12 13:31:23 2005 UTC revision 73 by james, Sun Feb 27 13:53:48 2005 UTC
# Line 2  Line 2 
2  -- This file is part of FactorCSS  -- This file is part of FactorCSS
3  -- Licensed under the MIT License,  -- Licensed under the MIT License,
4  --                http://www.opensource.org/licenses/mit-license  --                http://www.opensource.org/licenses/mit-license
5  -- Copyright 2004 James Bursa <james@semichrome.net>  -- Copyright 2005 James Bursa <james@semichrome.net>
6  --  --
7    
8  -- Datatypes for CSS  -- Datatypes for CSS
9    
10  module CSS where  module CSS where
11  import List  import List
12    import Numeric
13    
14  data Stylesheet  data Stylesheet
15          = Stylesheet          = Stylesheet
# Line 146  show_values :: [Value] -> String Line 147  show_values :: [Value] -> String
147  show_values = concat . intersperse " " . map show_value  show_values = concat . intersperse " " . map show_value
148    
149  show_value :: Value -> String  show_value :: Value -> String
150  show_value (Number n) = show n  show_value (Number n) = showFFloat Nothing n ""
151  show_value (Percentage p) = show p ++ "%"  show_value (Percentage p) = showFFloat Nothing p "%"
152  show_value (Length l) = l  show_value (Length l) = l
153  show_value (Ems e) = show e ++ "em"  show_value (Ems e) = showFFloat Nothing e "em"
154  show_value (Exs x) = show x ++ "ex"  show_value (Exs x) = showFFloat Nothing x "ex"
155  show_value (Angle a) = a  show_value (Angle a) = a
156  show_value (Time t) = t  show_value (Time t) = t
157  show_value (Freq f) = f  show_value (Freq f) = f

Legend:
Removed from v.72  
changed lines
  Added in v.73

  ViewVC Help
Powered by ViewVC 1.1.26