adam@32: con attr t = t -> css_value adam@29: val attr_string = atom adam@29: fun attr_int n = atom (show n) adam@29: val attr_url = css_url adam@29: fun valu [t] (f : attr t) (x : t) = f x adam@29: adam@29: fun prop1 [t] (f : attr t) (s : string) (x : t) = adam@29: oneProperty noStyle (value (property s) (f x)) adam@29: adam@29: fun prop (s : string) (xs : list css_value) = adam@29: oneProperty noStyle (List.foldl (fn x p => value p x) (property s) xs) adam@29: adam@29: fun props (ls : list (string * list css_value)) = adam@29: List.foldl (fn (s, xs) acc => adam@29: oneProperty acc (List.foldl (fn x p => value p x) (property s) xs)) adam@29: noStyle ls