package cascade

  1. Overview
  2. Docs
CSS generation and manipulation library for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.1.0.tbz
sha256=c303651e043ed8d807d3d6f2c3745233e792ce7c30d562c9717d284e1bf5ac6a
sha512=681847993deabdc3899f62268b3cbc931623abca0413b0e8873e8568ec25a86c4d3db7f7f0e6a6a6bf24dbfdc7df314dae07ae66d49f76f3dd6953a4381bbf54

doc/cascade/Cascade/Syntax/index.html

Module Cascade.SyntaxSource

Shared byte-level CSS syntax helpers.

Predicates and small string operations used across the parser, lexer, selector, and the container/media/supports/font-face readers.

Sourceval is_ascii_ident_start : char -> bool

is_ascii_ident_start c returns true if c is a valid ASCII ident-start code point: a-z, A-Z, _, or -.

Sourceval is_ascii_ident_continue : char -> bool

is_ascii_ident_continue c returns true if c is a valid ASCII ident-continue code point: is_ascii_ident_start c or 0-9.

Sourceval is_hex : char -> bool

is_hex c returns true if c is a hexadecimal digit (0-9, a-f, A-F).

Sourceval url_needs_quotes : string -> bool

url_needs_quotes s returns true when serializing s as a bare url(...) argument would change tokenization; the caller must wrap s in quotes.

Sourceval split_top_level_colon : Component.t list -> (Component.t list * Component.t list) option

split_top_level_colon cvs splits a component-value sequence at the first top-level : token, returning Some (before, after); the colon itself is dropped. Returns None if no top-level colon is present.

Sourceval strip_url_suffix : string -> string

strip_url_suffix url strips a query string (?...) and fragment (#...) from url. Used when resolving @import URLs against the host filesystem, where neither suffix is meaningful.

Sourceval url_file_path : string -> string

url_file_path url decodes the path component of url for a filesystem lookup.

Sourceval is_remote_url : string -> bool

is_remote_url url is true when url has a scheme or authority.