Merging of HTML classes via class attribute and v-bind broken
See original GitHub issueVue.js version
1.0.26
Reproduction Link
Steps to reproduce
As shown in the jsfiddle: The combination of a class
attribute and the dynamic :class
leads to a merged class attribute. However using v-bind does not.
What is Expected?
Both ways should merge correctly.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
How can I merge HTML attributes with component data in Vue?
You just need to use v-bind: or only colon(:) before the attributes to pass data as a value and that's it, Vue automatically...
Read more >Class and Style Bindings | Vue.js
Since class and style are both attributes, we can use v-bind to assign them ... those classes will be added to the component's...
Read more >[attribute] | CSS-Tricks
Almost anything more specific than a tag selector uses attributes — class and ID both select on those attributes on HTML elements.
Read more >Classes - pybind11 documentation
Classes #. This section presents advanced binding code for classes and it is assumed that you are already familiar with the basics from...
Read more >CSS Class Selectors: How to Use to Style an HTML Element
Do you want to stylize HTML elements without hassle? CSS classes will help you do the job! Here, you'll learn how to use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oopps.
This is the second time witin a few hours that I found out something new about a Vue feature of which I thought I knew everything… and this is even clearly documented in the API docs … My bad.
v-bind="..."
will not work, it’is not supported as i know. Shorthand for this is:="..."
😃. It should bev-bind:<attribute>="..."
this is not a bug