File: _dropdown_compat.scss

package info (click to toggle)
r-cran-bslib 0.9.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,412 kB
  • sloc: javascript: 13,349; makefile: 33; sh: 23
file content (23 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// # DROPDOWNS
//
// In bs3, dropdown menus are .dropdown-menu>li.active>a
// In bs4, dropdown menus are .dropdown-menu>.dropdown-item.active
//
// Also, bs3 dropdowns within tabs/pills are interfered with in bs4 by
// selectors like `.bs-tabs li>a`, making menu items look like tabs.

.dropdown-menu>li>a {
  @extend .dropdown-item;
}
.dropdown-menu>li.active>a {
  // This @extend works, but it litters `.dropdown-menu>li.active>a` all over
  // the bootstrap.css output because it's such a common class. Instead, we
  // copy these few properties from from _dropdown.scss.
  // @extend .active;
  color: $dropdown-link-active-color;
  text-decoration: none;
  @include gradient-bg($dropdown-link-active-bg);
}
.dropdown-menu>li.divider {
  @extend .dropdown-divider;
}