package css

  1. Overview
  2. Docs
CSS parser and printer

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-css-0.2.0.tar.bz2
md5=ceee290f230eb786d59de6ffcf692695
sha512=9ee5de92d764a5bb5b7dac1bc48d5892ccd8425d4226842148aae3322bf7335a738cc695fb36a29e3f90a487750a922f7301f44b6e60bb8954e4ad508ae60116

doc/css/Css/index.html

Module CssSource

Sourcemodule Log : sig ... end

Logging

Sourcemodule T : sig ... end

Types and base definitions.

Sourcemodule U : sig ... end

Utilities for parsing.

Sourcemodule Vp : sig ... end

Value parsers.

Sourcemodule S : sig ... end

Statements.

Sourcemodule Sp : sig ... end

Statement parsers.

Sourcemodule P : sig ... end

Properties

Sourcemodule Sh : sig ... end

Shorthand properties.

Sourcemodule C : sig ... end

Computing values.

Sourcemodule Kw : sig ... end

All case-sensitive keywords

Sourcetype 'ns css = 'ns S.statement list

A CSS structure is a list of S.statements.

Sourceval parse_string : ?prop_space:(module P.Prop_space) -> ?fname:string -> string -> string css

parse_string string parses the given string, creating the required T.ctx to compute locations. Optional argument fname can be used to specify a filename in the fname field of T.pos structures. Raises T.Error in case of error.

Sourcetype namespaces = Iri.t T.Smap.t

Namespaces map strings to IRIs.

Sourceval expand_ns : ?ns:namespaces -> string css -> Iri.t css

expand_ns css expands the namespaces in the given css, according to the namespace statements in css. Some predefined namespaces can be given with ns optional argument. If not specified, the default namespaces are used.

Sourceval expand_nested : 'a css -> 'a css

expand_nested statements expands nested rules in statements. By now, this expansion handles only nesting rules with a single selector nested.

Sourceval pp_string_css : Format.formatter -> string css -> unit

Pretty-print the given (non-expanded) CSS to the given formatter.

Sourceval pp_iri_css : Format.formatter -> Iri.t css -> unit

Pretty-print the given (with namespaces expanded) CSS to the given formatter.

Sourceval compute_decls : (module P.Prop_space) -> root:C.t -> parent:C.t -> C.t -> P.binding list -> C.t
OCaml

Innovation. Community. Security.