Navbar binding for style attribute does not work
See original GitHub issueI would like to set the background color of my navbar based on a database value. However, :style
seems not to work (it is being ignored) with the b-navbar
component.
I exported this JS Fiddle from playground: https://jsfiddle.net/87wpvsrf/1/
I put various elements that show where it should work, in some it does.
Navbar elements can have a regular style
attribute, but I need a binding.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
style binding not working - Stack Overflow
Just missing some () to unwrap (read) your observable properties in your if/else logic: Instead of: databadge: warnings ?
Read more >Attribute binding - Angular
Attribute binding in Angular helps you set values for attributes directly. With attribute binding, you can improve accessibility, style your application ...
Read more >Lesson 1: Understanding ID and Class in CSS
In this lesson you will learn how ID and Class attributes can be used to stylize individual elements (id) or groups of elements...
Read more >Keyboard-navigable JavaScript widgets - Accessibility | MDN
Web applications often use JavaScript to mimic desktop widgets such as menus, tree views, rich text fields, and tab panels.
Read more >x-bind - Alpine.js
x-bind allows you to set HTML attributes on elements based on the result of ... When using object-syntax, Alpine will NOT preserve original...
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
Vue is limited and needs the object notation to apply styles. See https://vuejs.org/v2/guide/class-and-style.html#Binding-Inline-Styles
This is resolved by now using the following markup: