package sosie

  1. Overview
  2. Docs
DOM equivalence checker for UI-conservative HTML/CSS refactoring

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.2.tar.gz
md5=199782a06197155221af65895bdd0efe
sha512=167cba8eefd621da19b205838541dda80027798520fb50e4af48b1ed715cccb57939a961a39e378a67852db1a8cdb4c86ffc48652779f67b5096450914a8d72f

doc/sosie.shared/Sosie_shared/Property_whitelist/index.html

Module Sosie_shared.Property_whitelistSource

Canonical CSS property whitelist.

Single source of truth for the CSS properties captured by sosie. Used by the js_of_ocaml extractor and the native snapshot parser. The list matches the DEFAULT_PROPERTIES array in the raw JS extractor.

Border properties are grouped: border-top-width, border-top-style, border-top-color map to the border_top : border record field in Snapshot_types. Shorthands that getComputedStyle does not reliably serialize (outline, text-emphasis, -webkit-text-stroke) are captured as individual longhands, so an empty computed value can never hide a real difference.

SVG paint presentation properties (fill, stroke, stroke-width) are captured on every element: they are inherited with constant defaults on HTML content (fill: rgb(0, 0, 0), stroke: none, stroke-width: 1px), so their presence adds effectively no spurious diffs while making SVG paint changes visible to the comparison.

Sourcetype property = {
  1. css_name : string;
    (*

    CSS property name, e.g. "background-color".

    *)
  2. field : string;
    (*

    OCaml record field name, e.g. "background_color".

    *)
}

A single whitelisted CSS property with its CSS and OCaml names.

Sourceval properties : property list

The 52 whitelisted CSS properties in declaration order.

Sourceval css_names : string list

Just the CSS names, for passing to getComputedStyle iteration.