package stk_xml

  1. Overview
  2. Docs

Class Style.styleSource

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.

inherit Stk.Object.o
method css_rules : ?base:Iri.t -> Stk_xml.Types.load_resource -> Stk_xml.Xml.doc -> Iri.t Css.S.rule_ list Lwt.t

#css_rules ?base load_resource xml_doc will return the list of CSS rules to use, according to the source property. base can be used to specify the base IRI to use to resolve IRIs of remote stylesheets found in the XML document, if the source is Document.

method source : source

Get the value of the Style.prop_source property.

method set_source : ?delay:float -> ?propagate:bool -> source -> unit

Set the value of the Style.prop_source property.