Page
Library
Module
Module type
Parameter
Class
Class type
Source
Css.CSourceComputing values.
A Computed.t maps a 'a property to a value of type 'a, if any.
opt t p returns the computed value of p in t if present or else returns the initial value of p.
filter_inherited t returns bindings of t where the property is inherited.
comp_global ~parent p v returns value of p according to global value v, i.e. it returns the initial value of p, of the value of p in parent.
get_p ~parent t p returns value of p in t. If p is not mapped in t and p is not inherited, returns initial value of p. If p is inherited, returns its value in parent. If p is not mapped in parent, returns initial value of p.
val mk_value_parser :
(T.ctx -> 'a Angstrom.t) ->
T.ctx ->
start:T.pos ->
'a P.value Angstrom.tval or_var :
(module P.Prop_space) ->
(T.ctx -> 'a Angstrom.t) ->
((module P.Prop_space) -> root:'b -> parent:'c -> t -> 'a -> 'd) ->
root:'b ->
parent:'c ->
t ->
'd ->
[< `V of 'a | `Var of string * string option ] ->
[> `V of 'd ]val accent_color :
'a ->
root:'b ->
parent:t ->
'c ->
[< `Auto
| `Current_color
| `Named_color of string
| `Rgba of float * float * float * float
| `System_color of T.system_color
| `Transparent ] ->
T.accent_colorComputes font_size in px when possible from absolute size or size relative to parent.
val word_spacing :
'a ->
root:t ->
parent:'b ->
t ->
[< T.word_spacing ] ->
[> T.word_spacing ]val border_spacing :
(module P.Prop_space) ->
root:t ->
parent:'a ->
t ->
([< `V of T.number * T.length_unit | `Var of string * string option ]
* [< `V of T.number * T.length_unit | `Var of string * string option ]) ->
[> `V of T.length ] * [> `V of T.length ]val font_family_ :
'a ->
root:'b ->
parent:'c ->
'd ->
[< T.font_family_ ] ->
[> T.font_family_ ]val font_family :
'a ->
root:'b ->
parent:'c ->
'd ->
[< T.font_family_ ] list ->
[> T.font_family_ ] listval comp :
((module P.Prop_space) -> root:'a -> parent:t -> t -> 'b -> 'b) ->
'b P.prop ->
(module P.Prop_space) ->
root:'a ->
parent:t ->
t ->
'b P.value ->
Computed.binding P.M.tcomp f p props ~root ~parent t v computes value of property p from its parsed value v, in the context of root and parent maps. f is applied on:
v is a variable,comp_global if v is a global keyword,v.The resulting computed value is then added to t for property p.
map props ~root ~parent t v returns v, without any computation. This is the default computation for several properties.
val register_prop_fun :
'a P.prop ->
((module P.Prop_space) -> root:t -> parent:t -> t -> 'a -> 'a) ->
unitregister_prop_fun p f registers f as computation function for values of property p. This can be used to override or specify the computation function of a property.
val compute_decl :
(module P.Prop_space) ->
root:t ->
parent:t ->
t ->
P.binding ->
Computed.binding P.M.t