package virtual_dom
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=81444d2a97812b09c445e4d1c09ad9466e40a7886699b0d50fe1341a7eb9c7c5
md5=14d8f77f5119c9c88054675586173f49
doc/virtual_dom.css_gen/Css_gen/index.html
Module Css_gen
A set of functions to generate css declaration lists. This library can be used to programmatically produce strings suitable for the HTML style attribute, e.g. style="display:flex;background-color:red".
val sexp_of_css_global_values : css_global_values -> Ppx_sexp_conv_lib.Sexp.tval css_global_values_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> css_global_valuesval __css_global_values_of_sexp__ :
Ppx_sexp_conv_lib.Sexp.t ->
css_global_valuesval compare_css_global_values : css_global_values -> css_global_values -> intmodule Color : sig ... endmodule Length : sig ... endmodule Auto_or_length : sig ... endinclude Core_kernel.Bin_prot.Binable.S with type t := t
include Bin_prot.Binable.S_only_functions with type t := t
val bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int -> t) Bin_prot.Read.readerThis function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.
val bin_shape_t : Bin_prot.Shape.tval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval bin_t : t Bin_prot.Type_class.tval create : field:string -> value:string -> tCreate a single property, value pair (a declaration in CSS parlance). The value must be a valid CSS literal. We do run a simple CSS parser on the value to validate this and will throw an exception if that parser fails. Note that the parser is less forgiving than many browsers. That is browsers will silently accept or drop many illegal constructs. We prefer to raise on them, so that errors are detected earlier.
It is recommended to use one of the other constructors instead if they are available. If they are not, consider adding them to this library.
val empty : tval is_empty : t -> boolval position :
?top:Length.t ->
?bottom:Length.t ->
?left:Length.t ->
?right:Length.t ->
[ `Static | `Absolute | `Sticky | `Relative | `Fixed ] ->
tSet the position attribute and optionally top, bottom,left,right Note that left and top have no effect when position is `Static.
Neither combine nor concat validate that each t is unique. For combine x y, y will override x if they are the same attribute. For concat l, the greatest index of an attribute will prevail.
val to_string_list : t -> (string * string) listval to_string_css : t -> stringval of_string_css_exn : string -> tThe inverse of to_string_css. Primarily useful if you want to reuse a css literal from the web (aka copy paste web design). Raises if the string fails validation. See create for comments on the validation we do.
val box_sizing : [ `Content_box | `Border_box | css_global_values ] -> tval display :
[ `Inline
| `Block
| `Inline_block
| `List_item
| `Table
| `Inline_table
| `None
| css_global_values ] ->
tval visibility : [ `Visible | `Hidden | `Collapse | css_global_values ] -> tval z_index : int -> tval opacity : float -> tval font_family : string list -> tval font_style : font_style -> tval font_weight : font_weight -> tval font_variant : font_variant -> tval font :
size:Length.t ->
family:string list ->
?style:font_style ->
?weight:font_weight ->
?variant:font_variant ->
unit ->
tval bold : tval text_align :
[ `Left | `Right | `Center | `Justify | css_global_values ] ->
tval horizontal_align : [ `Left | `Right | `Center | css_global_values ] -> tval vertical_align : [ `Top | `Bottom | `Middle | css_global_values ] -> tval white_space :
[ `Normal | `Nowrap | `Pre | `Pre_line | `Pre_wrap | css_global_values ] ->
tval float : [ `None | `Left | `Right | css_global_values ] -> tval margin_top : Auto_or_length.t -> tval margin_bottom : Auto_or_length.t -> tval margin_left : Auto_or_length.t -> tval margin_right : Auto_or_length.t -> tval uniform_margin : Auto_or_length.t -> tval margin :
?top:Auto_or_length.t ->
?bottom:Auto_or_length.t ->
?left:Auto_or_length.t ->
?right:Auto_or_length.t ->
unit ->
ttype border_style = [ | `None| `Hidden| `Dotted| `Dashed| `Solid| `Double| `Groove| `Ridge| `Inset| `Outset| css_global_values
]val border_top :
?width:Length.t ->
?color:Color.t ->
style:border_style ->
unit ->
tval border_bottom :
?width:Length.t ->
?color:Color.t ->
style:border_style ->
unit ->
tval border_left :
?width:Length.t ->
?color:Color.t ->
style:border_style ->
unit ->
tval border_right :
?width:Length.t ->
?color:Color.t ->
style:border_style ->
unit ->
tval border :
?width:Length.t ->
?color:Color.t ->
style:border_style ->
unit ->
tval border_collapse : [ `Separate | `Collapse | css_global_values ] -> tval outline :
?width:Length.t ->
?color:Color.t ->
style:border_style ->
unit ->
tval text_decoration :
?style:text_decoration_style ->
?color:Color.t ->
line:text_decoration_line list ->
unit ->
tval flex_container :
?inline:bool ->
?direction:[ `Row | `Row_reverse | `Column | `Column_reverse ] ->
?wrap:[ `Nowrap | `Wrap | `Wrap_reverse ] ->
?align_items:item_alignment ->
unit ->
tval flex_item :
?order:int ->
?basis:Auto_or_length.t ->
?shrink:float ->
grow:float ->
unit ->
tval align_self : item_alignment -> tval animation :
name:string ->
duration:Core_kernel.Time_ns.Span.t ->
?delay:Core_kernel.Time_ns.Span.t ->
?direction:
[ `Normal
| `Reverse
| `Alternate
| `Alternate_reverse
| css_global_values ] ->
?fill_mode:[ `None | `Forwards | `Backwards | `Both | css_global_values ] ->
?iter_count:int ->
?timing_function:string ->
unit ->
tNote: You must include the names @keyframes in the stylesheet
module Stable : sig ... end