question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Merging of HTML classes via class attribute and v-bind broken

See original GitHub issue

Vue.js version

1.0.26

Reproduction Link

http://jsfiddle.net/d3xwtrqn/

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:closed
  • Created 7 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
LinusBorgcommented, Aug 3, 2016

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.

2reactions
iagafonovcommented, Aug 3, 2016

v-bind="..." will not work, it’is not supported as i know. Shorthand for this is :="..." 😃. It should be v-bind:<attribute>="..." this is not a bug

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found