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.

How to overrule b-dropdown classes in .vue component?

See original GitHub issue

Hello!

I would like to overrule the border and caret of a b-dropdown classes within a component. In Chrome-developer I see the .btn-secondary class from which I can alter for example color or border. In my code I use for example but it has no effect. What am I doing wrong?

When I put this code in App.vue it works…

<style scoped>
.btn-secondary {
    color: red;
    border-color: yellow;
}
</style>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
tmorehousecommented, Nov 13, 2018

It is basic cascading styles (CSS)

Add a class to your b-dropdown component (i.e. ‘<b-dropdown class=“my-dropdown” … >’),

Then target the inner parts as such with your style overrides:

.my-dropdown .dropdown-menu { /* some styles here */ }
.my-dropdown .dropdown-menu .dropdown-item { /* some styes here */ }
.my-dropdown > button { /* some styles here */ }
8reactions
emanuelmutschlechnercommented, May 9, 2018

Scoped styles won’t work in BV components

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropdown | Components - BootstrapVue
Turn your dropdown menu into a drop-right menu by setting the dropright prop. Or, turn it into a drop-left menu by setting the...
Read more >
Vue SPA overrides dropdown - Stack Overflow
I'm building a, SPA with Vue JS, and I'm having some problems with my Sidebar component. The default functionality of my Dropdown -...
Read more >
CSS Variables - Vue Select
# Overriding Default Styles ... Vue Select takes the approach of using selectors with a single level of specificity, while using classes that...
Read more >
Vue Dropdowns - examples & tutorial. Bootstrap & Material ...
Responsive Vue Dropdowns built with the latest Bootstrap 5. ... falsy ref value to MDBDropdownMenu and toggle dropdown with a MDBDropdownToggle component.
Read more >
Override click event | Vue Forums - Syncfusion
Forum Thread - Override click event - Vue. ... Whenever I hit that element, the dropdown opens first. I tried overriding ... <div...
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