tabs.scss 1.8 KB

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