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
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,6 +233,24 @@ For example:
233
233
234
234
In this example, the "hidden" class will only be applied when the value of the `foo` data attribute is `true`.
235
235
236
+
**`x-bind` for style attributes**
237
+
238
+
`x-bind` behaves a little differently when binding to the `style` attribute.
239
+
240
+
For styles, you pass in an object who's keys are style names, and values are either CSS property values (strings) or falsy. If the value is falsy the style will not be applied.
In this example, the "display" style will be set to "hidden", "width" will be "200px" and height will be "20px"
253
+
236
254
**`x-bind` for boolean attributes**
237
255
238
256
`x-bind` supports boolean attributes in the same way that value attributes, using a variable as the condition or any JavaScript expression that resolves to `true` or `false`.
0 commit comments