(dropdown+nav-item-dropdown): `noCaret` option causes unwanted side effects
See original GitHub issueEnabling the noCaret
option on the dropdown
or nav-item-dropdown
component causes some unwanted styling issues due to dropping the .dropdown-toggle
class.
Bootstrap uses this class for some minor styling changes for dropdown
s in button-group
s, input-group
s and even the button itself.
A better solution would be to add a custom class like .dropdown-toggle-no-caret
to the dropdown-toggle
when the noCaret
option is set and use some custom CSS to hide the caret.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:18 (16 by maintainers)
Top Results From Across the Web
Avoid dropdown menu close on click inside - Stack Overflow
By default, the dropdown menu is closed when clicking inside or outside the dropdown menu. You can use the autoClose option to change...
Read more >Dropdowns · Bootstrap v5.0
Overview. Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap ...
Read more >Dropdown | Components - BootstrapVue
Dropdowns are toggleable, contextual overlays for displaying lists of links and actions in a dropdown menu format.
Read more >Bootstrap 4 Dropdown - examples & tutorial.
Bootstrap dropdown is a toggleable menu embedding additional links or content. It allows you to construct advanced navigation and link categorization.
Read more >Dropdowns | React-Bootstrap
On the other hand, Bootstrap's dropdowns are designed to more generic and application in a variety of situations. For this reason we don't...
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
A quick and dirty way to fix the rounded corner issue when using
no-caret
on a dropdown button is to add Bootstrap’s newrounded
class.Example (first button does not have class, second button has the class applied with
toggle-class="rounded"
):@jackmu95 we currently try and follow the bootstrap V4 styles where possible, without creating new styling classes.
There has been muttering over at Bootstrap on github about no caret options for dropdowns, but nothing set in stone other than the mentioned removal of the dropdown-toggle class.
If there are changes over at Bootstrap V4 for handling a no caret toggle via classes, then we will definitely adjust how it is handled in Bootstrap-vue.