package virtual_dom

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A collection of CSS attributes.

type attr
type t = attr list
val merge_classes_and_styles : t -> t

merge_classes_and_styles groups together the class attributes and style attributes from the given list into a single style and class attribute, e.g.:

class="foo"; style="color:blue"; class="bar"; id="id"; style="margin:30px;"

becomes

class="foo bar"; style="color:blue; margin:30px;"; id="id"

val map_style : t -> f:(Css_gen.t -> Css_gen.t) -> t

If there is no style attribute the empty Css_gen.t will be passed to f. Most of the time you probably want to use add_style instead.

val add_style : t -> Css_gen.t -> t
val add_class : t -> string -> t