tabs.scss 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. button {
  28. border: 0;
  29. border-radius: 0;
  30. color: var(--neutral-70);
  31. margin-right: unset;
  32. padding: var(--spacing-04);
  33. line-height: var(--line-height-03);
  34. text-decoration: none;
  35. &:focus,
  36. &:hover {
  37. border: 0;
  38. }
  39. &:focus,
  40. &:focus-visible {
  41. background-color: unset;
  42. outline: 0;
  43. }
  44. &:hover {
  45. background-color: var(--neutral-10);
  46. text-decoration: none;
  47. }
  48. &:focus-visible {
  49. @include box-shadow-button-input;
  50. }
  51. }
  52. }
  53. li > a.active,
  54. li > button.active {
  55. background-color: transparent !important;
  56. border: 0 !important;
  57. border-bottom: 3px solid var(--green-50) !important;
  58. color: var(--neutral-90) !important;
  59. }
  60. }
  61. }
  62. .tab-content {
  63. margin-top: var(--spacing-11);
  64. }
  65. }
  66. // Scroll the page up a bit to allow tab links to be shown when navigating to
  67. // a bookmarked tab hash
  68. [data-ol-bookmarkable-tabset] .tab-pane {
  69. scroll-margin-top: 120px;
  70. }