Is it possible to use brr to toggle css pointer-events to none/auto?

El (brr.Brr.El) lists

val set_inline_style : ?important:bool -> Style.prop -> Jstr.t -> t -> unit
set_inline_style ~important p v e sets the inline style property p of e to v with priority important (defaults to false).

which is what we want, so then we lookup Style.prop and get :

https://erratique.ch/software/brr/doc/Brr/El/Style/index.html#val-cursor

which seems quite limited compared to all of CSS.

XY problem: I am trying to conditionally toggle the style/css field of an element to be “pointer-events: none” / “pointer-events: auto” dynamically.

Thanks!

Style.prop is just an alias for Jstr.t:

type prop = Jstr.t

So you can pass in any Jstr.t you want, not just the values in the Style module.

2 Likes