Page
Library
Module
Module type
Parameter
Class
Class type
Source
Css.PSourceProperties
Parsed property values, with location and important flag.
A property definition.
Parser to parser values for the given property.
to_string p v applies the property's function passed at its creation to map a value of the type of the property to a string.
value_to_string p v returns a string representation of the given value for the given property, using T.string_of_p_value with to_string p.
Returns the property pretty-printer.
Returns T.pp_p_value with the pretty-printer for the given property.
val mk_prop :
string ->
?register_prop:bool ->
?inherited:bool ->
'a ->
('a -> string) ->
?pp:(Format.formatter -> 'a -> unit) ->
(T.ctx -> 'a Angstrom.t) ->
'a propmk_prop name v to_string parser creates a new property name with initial value v, the to_string function to map a value to a string and an Angstrom parser. This parser takes a context T.ctx and returns a value of the same type as v or fails to indicate that no value of this type could be parsed. Optional arguments:
register_prop (default is true) indicates whether to register the property so that its parser is used when encoutering a declaration with this property in CSS.inherited (default is false) specifies whether the value for this property is inherited from parent or not. This is used in computations.pp can be used to specify a pretty-printing function for values of this property. If none is provided, a default one is created using to_string.Css space)