package ppx_css

  1. Overview
  2. Docs
A ppx that takes in css strings and produces a module for accessing the unique names defined within

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=e60e31aadd820b131f7f05827f369164564400bd4fd51c199d066abf7e68753f

doc/ppx_css.syntax/Ppx_css_syntax/index.html

Module Ppx_css_syntaxSource

Sourcemodule String_constant : sig ... end

This module parses a call to ppx_css into nicer parts to make the implementation of ppx_css cleaner.

Sourcetype t = {
  1. rewrite : Ppxlib.expression Core.String.Map.t;
    (*

    For a given (key, value) pair, value will "rewrite" itself wherever "key" is roughly: s/$key/$value/g

    Equivalent to the ~rewrite parameter in the call to stylesheet on ppx_css.

    *)
  2. css_string : String_constant.t;
    (*

    The contained CSS string. Equivalent to the string parameter given to ppx_css.

    *)
  3. dont_hash_prefixes : string list;
}
Sourceval parse_stylesheet : Ppxlib.expression -> t

Given the AST of an expression like stylesheet ~rewrite:[] "" will result in a "parsed" t.

stylesheet is the %css stylesheet {|stylesheet...|} syntax and expands to a module declaration.

Sourceval parse_inline_expression : Ppxlib.expression -> t

Given the AST of an expression like "" ~rewrite:[] will result in a "parsed" t

inline is the syntax %css {|declarations...|} and expands to an expression.

Sourceval empty_stylesheet : css_string:String_constant.t -> t
Sourcemodule Serializable_options : sig ... end
Sourcemodule Preprocess_arguments : sig ... end

This module contains the parameters sent in via the jbuild/dune file's preprocess field.

OCaml

Innovation. Community. Security.