Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_dropdown.scss 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Dropdowns
  2. // *****************************************************************
  3. .dropdown-menu {
  4. box-shadow: var(--#{$prefix}dropdown-box-shadow);
  5. margin-block-start: 1px !important;
  6. text-align: start;
  7. > li:not(.disabled) > a:not(.dropdown-item):active,
  8. > li:not(.disabled) > a:not(.dropdown-item).active,
  9. > li.active:not(.disabled) > a:not(.dropdown-item) {
  10. background-color: var(--#{$prefix}dropdown-link-active-bg);
  11. color: var(--#{$prefix}dropdown-link-active-color);
  12. }
  13. /* Mega dropdown inside the dropdown menu */
  14. .mega-dropdown > & {
  15. inset-inline: 0;
  16. }
  17. }
  18. .btn-xs.dropdown-toggle::after {
  19. @include caret-down(.45em);
  20. }
  21. /* Split dropdowns */
  22. .dropdown-toggle-split {
  23. &::after,
  24. .dropup &::after,
  25. .dropend &::after {
  26. margin-inline: 0;
  27. }
  28. .dropstart &::before {
  29. margin-inline: 0;
  30. }
  31. }
  32. /* Dropdown item line height */
  33. .dropdown-item {
  34. li:not(:first-child) &,
  35. .dropdown-menu &:not(:first-child) {
  36. margin-block-start: 2px;
  37. }
  38. &.text-danger:active {
  39. color: var(--#{$prefix}primary) !important;
  40. }
  41. }
  42. /* Hidden dropdown toggle arrow */
  43. .dropdown-toggle.hide-arrow,
  44. .dropdown-toggle-hide-arrow > .dropdown-toggle {
  45. &::before,
  46. &::after {
  47. display: none;
  48. }
  49. }
  50. @each $breakpoint in map-keys($grid-breakpoints) {
  51. @include media-breakpoint-up($breakpoint) {
  52. $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
  53. .dropdown-menu#{$infix}-start {
  54. --#{$prefix}position: start;
  55. &[data-bs-popper] {
  56. inset-inline: 0 auto;
  57. }
  58. }
  59. .dropdown-menu#{$infix}-end {
  60. --#{$prefix}position: end;
  61. &[data-bs-popper] {
  62. inset-inline: auto 0;
  63. }
  64. }
  65. }
  66. }