package stk_xml

  1. Overview
  2. Docs
Library to display xml/html

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-stk-0.5.0.tar.bz2
md5=beeed5752ff67b3abeb1bcf8fb6b9098
sha512=c1603ae66956a674864ad875212fdbfc8d8016983202108d492b0d8722106b1e982e9fdc04b20d1b7adf5013343252fc5173851751906271731bc81d70dc789c

doc/stk_xml/Stk_xml/Style/index.html

Module Stk_xml.StyleSource

CSS styling.

This module has its own log module named "stk_xml_style".

Sourcetype source =
  1. | Document of Iri.t Css.S.rule_ list
    (*

    The style is taken from the XML document, prepended by a list of CSS rules. The stylesheets are retrieved from <html>/<head>/<link> and <html><head>/<style> nodes from the XML document.

    *)
  2. | Rules of Iri.t Css.S.rule_ list
    (*

    The style is specified by a list of CSS rules.

    *)

The source for CSS styling.

Sourceval prop_source : source Stk.Props.prop

The property used to store the source of style.

Sourceval rules_of_css : Css.S.Smap.key Css.S.statement list -> Iri.t Css.S.rule_ list

rules_of_css statements expand the CSS statements according to namespaces definitions, expand the nested rules and returns only the rules (i.e. it filters out @-rules).

Sourceclass style : ?props:Stk.Props.t -> unit -> object ... end

This class is used to create objects which define the source to be used for CSS styling, through property prop_source. A handler can be connected to a change of the source (using the connect method and Stk.Object.Prop_changed event). The class also defines a style.css_rules method to compute the CSS rules from the source, the XML document and a function to load remote resources.

Sourceval style : ?props:Stk.Props.t -> unit -> style

Create a new style object.

Sourceval default_xhtml_css : string Css.css

CSS statements containing default property values for all xhtml elements. Source: https://www.w3schools.com/cssref/css_default_values.php.

OCaml

Innovation. Community. Security.