elemental2
elemental2 copied to clipboard
Add setters to CSS union types
Would it be possible to add setter methods to the CSS style properties that are represented by a Union type? For example, to set the padding property you can't do
someElement.style.setPadding("100px")
Where as for non union types you can do:
someElement.style.color ="red";
We have that logic for parameters method that take UnionType so it could make sense to have that for field. My concern is that it could bring some confusion to end users for having getter/setter for some filed and not for all. If we go that road we should generate getter/setter for every field. Note that I tried to generate getter and setter for every field but it introduces soveral issues like: conflict with exisiting method, JsOverlay method overriding,...