package cascade

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.1.0.tbz
sha256=c303651e043ed8d807d3d6f2c3745233e792ce7c30d562c9717d284e1bf5ac6a
sha512=681847993deabdc3899f62268b3cbc931623abca0413b0e8873e8568ec25a86c4d3db7f7f0e6a6a6bf24dbfdc7df314dae07ae66d49f76f3dd6953a4381bbf54

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