package cascade

Build not yet checked
  1. Overview
  2. Docs
CSS generation and manipulation library for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.3.0.tbz
sha256=6240100b1bc62f7e33f820fa3d7f23155f36f9c77d17a49de9e3559141414a08
sha512=3f9a8f7cabf16a09f063e5f807d74f0f9fac8ca1eda01b1873e67ac8289a37837341ae2db1a163ac7965a8360f1601dacdc3fba2d718857caef064827913b1e4

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