Rule: css extension

Generates a Css.RuleCss.Rule (from bs-css) given a single CSS rule. The %css extension is useful with combination with the Array API, to compose and re-use rules.

Example

let rule: Css.Rule.t = %css("display: block")
let rule: Css.Rule.t = %css("display: block")

Features

  • CSS Declarations aren't allowed. Declarations can contain selectors, rules only a pair of property/value. If you need a selector or more than one rule, use %cx%cx instead.
  • Semi-colon is optional. display: block;display: block; and display: blockdisplay: block are the same.
  • Curly braces aren't allowed. { display: block }{ display: block } isn't valid.