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/src/cascade.html/html_node.ml.html

Source file html_node.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(* The tree {!Cascade.Resolve} walks: an {!Html} element, read through the
   parent and child links markup.ml left on it. *)

type t = Html.element

let equal = ( == )
let name (n : t) = Some n.Html.tag
let id n = Html.attribute n "id"
let classes = Html.classes
let attribute = Html.attribute
let parent (n : t) = n.Html.parent

(* [children] is the element children the structural selectors count; text is
   reported apart because [:empty] counts that too, and a comment counts for
   neither. *)
let children = Html.element_children
let text_children = Html.text_children