Open Defman21 opened 5 years ago
Sounds reasonable. @ruckustboom do you agree, or should we add an Effect
subclass called None
?
I think supporting nullability would make more sense in this case, but it would be best to then use a custom renderer for the effect
property (since null !is Effect
, the is Effect
test in the linked code won't work, and we shouldn't treat all nulls the same).
Also, according to the CSS reference, it looks like you're correct the result should be "null"
and not "none"
, though we'd probably want to test it just to make sure.
Any ETA on this? Right now I'm using a temporary workaround where I extend the Effect class but don't implement any of the functions. It would be great if there was an official way to do this.
I don't have time to prioritize this at the moment, sorry.
For example, I'm styling my own tooltip. There's an effect that drops text shadow by default, which I want to drop. I can't use
null
as the value for theeffect
property, though I can use e.g.Shadow
to get the"none"
(which should be"null"
I believe) value here: https://github.com/edvin/tornadofx/blob/master/src/main/java/tornadofx/CSS.kt#L552