package ppx_css
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/src/ppx_css.syntax/preprocess_arguments.ml.html
Source file preprocess_arguments.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
open! Core type t = { dont_hash_prefixes : String.Set.t ; dont_hash : String.Set.t ; rewrite : string String.Map.t } let singleton = ref { dont_hash_prefixes = String.Set.empty ; dont_hash = String.Set.empty ; rewrite = String.Map.empty } ;; let get () = !singleton let add ~get ~set new_ = singleton := set !singleton (Set.add (get !singleton) new_) let add_dont_hash new_ = add ~get:(fun t -> t.dont_hash) ~set:(fun t dont_hash -> { t with dont_hash }) new_ ;; let add_dont_hash_prefixes new_ = add ~get:(fun t -> t.dont_hash_prefixes) ~set:(fun t dont_hash_prefixes -> { t with dont_hash_prefixes }) new_ ;; let add_rewrite ~from ~to_ = singleton := { !singleton with rewrite = Map.set !singleton.rewrite ~key:from ~data:to_ } ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>