package cascade

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.0.0.tbz
sha256=c11bbdc7ab0eee8c03cd162e3e7fd1cb20de62beb13342b3b150a89264ee0056
sha512=43fd97a55c3b1dc4db5c87aa1a5a047d902e902ab2064af3a7c5bf945ebc333f8cd90ecca8013c17be5b950498eace8e0094ee4319eba408285e2bec8d7cdf7b

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;
    (*

    Count of kept rules, for reporting.

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