elemental2 icon indicating copy to clipboard operation
elemental2 copied to clipboard

Add setters to CSS union types

Open pstockley opened this issue 6 years ago • 1 comments

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";

pstockley avatar Apr 03 '18 15:04 pstockley

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,...

jDramaix avatar Apr 13 '18 21:04 jDramaix