package cascade

  1. Overview
  2. Docs
CSS generation and manipulation library for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.2.1.tbz
sha256=1cf5079b3797cd6e70fbced8dc2631074f357d36fcdea8597c7ba17ac2903f6e
sha512=43f5e6a3986f8f43ce948b8f1d59f6f00e1047f5707c5449b6323b683d2ecd51a0fb34793aad9c48904a67b0f7268d7379ab9baf29917c25a962064bfa3ab694

doc/cascade/Cascade/Apply/index.html

Module Cascade.ApplySource

Project a stylesheet onto an element tree: resolve the cascade for each element and return the declarations to write into its style attribute, along with the rules that have no inline form. The cascade itself is Resolve; this adds the inline-specific policy. Pure - it returns the declarations to apply, the caller writes them onto the tree.

Sourcetype 'node assignment = 'node * Declaration.declaration list

A node paired with the inline-style declarations to write onto it.

Sourcetype 'node result = {
  1. styles : 'node assignment list;
    (*

    Each element with the declarations to set on its style attribute.

    *)
  2. keep_css : string;
    (*

    The rules with no inline form, serialised as a minified <style> body, or "" when there are none.

    *)
  3. kept : int;
    (*

    How many rules keep_css holds, for reporting. A block at-rule contributes the rules inside it rather than itself; one that holds no statements of its own (@font-face, @keyframes) counts as the one thing it keeps.

    *)
}
Sourcemodule Make (Node : Resolve.NODE) : sig ... end