package cascade

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.0.0.tbz
sha256=c11bbdc7ab0eee8c03cd162e3e7fd1cb20de62beb13342b3b150a89264ee0056
sha512=43fd97a55c3b1dc4db5c87aa1a5a047d902e902ab2064af3a7c5bf945ebc333f8cd90ecca8013c17be5b950498eace8e0094ee4319eba408285e2bec8d7cdf7b

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.