_sidebar.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .bd-sidebar {
  2. @include media-breakpoint-down(md) {
  3. margin: 0 -.75rem 1rem;
  4. }
  5. }
  6. .bd-links {
  7. overflow: auto;
  8. font-weight: 600;
  9. @include media-breakpoint-up(md) {
  10. position: sticky;
  11. top: 5rem;
  12. // Override collapse behaviors
  13. // stylelint-disable-next-line declaration-no-important
  14. display: block !important;
  15. height: subtract(100vh, 7rem);
  16. // Prevent focus styles to be cut off:
  17. padding-left: .25rem;
  18. margin-left: -.25rem;
  19. overflow-y: auto;
  20. }
  21. > ul {
  22. @include media-breakpoint-down(md) {
  23. padding: 1.5rem .75rem;
  24. background-color: $gray-100;
  25. border-bottom: 1px solid $gray-200;
  26. }
  27. }
  28. a {
  29. padding: .1875rem .5rem;
  30. margin-top: .125rem;
  31. margin-left: 1.25rem;
  32. color: rgba($black, .65);
  33. text-decoration: if($link-decoration == none, null, none);
  34. &:hover,
  35. &:focus {
  36. color: rgba($black, .85);
  37. text-decoration: if($link-hover-decoration == underline, none, null);
  38. background-color: rgba($bd-purple-bright, .1);
  39. }
  40. }
  41. .btn {
  42. // Custom styles (as we don't have a completely neutral button style)
  43. padding: .25rem .5rem;
  44. font-weight: 600;
  45. color: rgba($black, .65);
  46. background-color: transparent;
  47. border: 0;
  48. &:hover,
  49. &:focus {
  50. color: rgba($black, .85);
  51. background-color: rgba($bd-purple-bright, .1);
  52. }
  53. &:focus {
  54. box-shadow: 0 0 0 1px rgba($bd-purple-bright, .7);
  55. }
  56. // Add chevron if there's a submenu
  57. &::before {
  58. width: 1.25em;
  59. line-height: 0; // Align in the middle
  60. content: escape-svg($sidebar-collapse-icon);
  61. @include transition(transform .35s ease);
  62. transform-origin: .5em 50%;
  63. }
  64. &[aria-expanded="true"] {
  65. color: rgba($black, .85);
  66. &::before {
  67. transform: rotate(90deg);
  68. }
  69. }
  70. }
  71. .active {
  72. font-weight: 600;
  73. color: rgba($black, .85);
  74. }
  75. }