tabs.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .ol-tabs {
  2. --border-width-base: 3px;
  3. .nav-tabs-container {
  4. overflow-x: auto;
  5. display: flex;
  6. flex-direction: column;
  7. @include media-breakpoint-down(md) {
  8. display: block;
  9. }
  10. .nav-tabs {
  11. display: inline-flex;
  12. gap: var(--spacing-04);
  13. margin: 0 auto;
  14. padding: 0;
  15. border-bottom: var(--border-width-base) solid var(--neutral-20);
  16. text-align: center;
  17. border-top: 2px solid transparent; // so that top focus border is visible
  18. min-width: max-content; // This is for horizontal scrolling
  19. li {
  20. display: inline-block;
  21. float: none;
  22. margin-bottom: calc(var(--border-width-base) * -0.6);
  23. &:last-child {
  24. margin-right: 0;
  25. }
  26. a {
  27. border: 0;
  28. border-radius: 0;
  29. color: var(--neutral-70);
  30. margin-right: unset;
  31. padding: var(--spacing-04);
  32. line-height: var(--line-height-03);
  33. text-decoration: none;
  34. &:focus,
  35. &:hover {
  36. border: 0;
  37. }
  38. &:focus,
  39. &:focus-visible {
  40. background-color: unset;
  41. outline: 0;
  42. }
  43. &:hover {
  44. background-color: var(--neutral-10);
  45. text-decoration: none;
  46. }
  47. &:focus-visible {
  48. @include box-shadow-button-input;
  49. }
  50. }
  51. }
  52. li > a.active {
  53. background-color: transparent !important;
  54. border: 0 !important;
  55. border-bottom: 3px solid var(--green-50) !important;
  56. color: var(--neutral-90) !important;
  57. }
  58. }
  59. }
  60. .tab-content {
  61. margin-top: var(--spacing-11);
  62. }
  63. }
  64. // Scroll the page up a bit to allow tab links to be shown when navigating to
  65. // a bookmarked tab hash
  66. [data-ol-bookmarkable-tabset] .tab-pane {
  67. scroll-margin-top: 120px;
  68. }