Skip to content

Commit 5ac41da

Browse files
regularmikekazupon
authored andcommitted
Add reminder about using quotes with kebab-case (vuejs#676)
It may be obvious to many users but the guide seems to suggest that you can use unquoted kebab-case CSS property names. A reminder to use quotes here would be helpful since the "invalid expression" warning could be vague in many cases.
1 parent 1a57737 commit 5ac41da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/guide/class-and-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ When `isActive` is truthy, the rendered HTML will be:
153153

154154
### Object Syntax
155155

156-
The object syntax for `v-bind:style` is pretty straightforward - it looks almost like CSS, except it's a JavaScript object. You can use either camelCase or kebab-case for the CSS property names:
156+
The object syntax for `v-bind:style` is pretty straightforward - it looks almost like CSS, except it's a JavaScript object. You can use either camelCase or kebab-case (use quotes with kebab-case) for the CSS property names:
157157

158158
``` html
159159
<div v-bind:style="{ color: activeColor, fontSize: fontSize + 'px' }"></div>

0 commit comments

Comments
 (0)