annotate style.ur @ 31:b5432d74841a

Update for key/mouse handler change
author Adam Chlipala <adam@chlipala.net>
date Sat, 21 Jul 2012 10:15:14 -0400
parents 93140c5cc972
children d32fb0f7b137
rev   line source
adam@29 1 class attr t = t -> css_value
adam@29 2 val attr_string = atom
adam@29 3 fun attr_int n = atom (show n)
adam@29 4 val attr_url = css_url
adam@29 5 fun valu [t] (f : attr t) (x : t) = f x
adam@29 6
adam@29 7 fun prop1 [t] (f : attr t) (s : string) (x : t) =
adam@29 8 oneProperty noStyle (value (property s) (f x))
adam@29 9
adam@29 10 fun prop (s : string) (xs : list css_value) =
adam@29 11 oneProperty noStyle (List.foldl (fn x p => value p x) (property s) xs)
adam@29 12
adam@29 13 fun props (ls : list (string * list css_value)) =
adam@29 14 List.foldl (fn (s, xs) acc =>
adam@29 15 oneProperty acc (List.foldl (fn x p => value p x) (property s) xs))
adam@29 16 noStyle ls