You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes for a slick way to bind to boolean attributes with non-boolean properties that can be truthy or falsey
For instance, a possible use case from iron-image
/** * Sets a sizing option for the image. Valid values are `contain` (full * aspect ratio of the image is contained within the element and * letterboxed) or `cover` (image is cropped in order to fully cover the * bounds of the element), or `null` (default: image takes natural size). */sizing: {type: String,value: null},
Can you please provide a use-case where the hidden tag must be true instead of the sizingvalue.
When I see 'hiding' I think about CSS selectors that apply some displaystyles, however div[hidden] {} would also match <div hidden$="[[sizing]]">.
This has been previously requested in #2343 . The official response was:
We're not very interested in expanding the vocabulary of expressions right now.
You can always make a computed function that applies a boolean pass over the input:
This makes for a slick way to bind to boolean attributes with non-boolean properties that can be truthy or falsey
For instance, a possible use case from iron-image
...
Otherwise, you need to put it in a computed binding.
ht to @bicknellr for the idea.
The text was updated successfully, but these errors were encountered: