package sosie
Install
dune-project
Dependency
Authors
Maintainers
Sources
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.
type property = {css_name : string;(*CSS property name, e.g.
*)"background-color".field : string;(*OCaml record field name, e.g.
*)"background_color".
}A single whitelisted CSS property with its CSS and OCaml names.
Just the CSS names, for passing to getComputedStyle iteration.