tabs.less 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .ol-tabs {
  2. // Overrides for nav.less
  3. .nav-tabs {
  4. border: 0 !important;
  5. margin-bottom: 0;
  6. margin-top: -@line-height-computed; //- adjusted for portal-name
  7. padding: @padding-lg 0 @padding-md;
  8. text-align: center;
  9. }
  10. .nav-tabs > li {
  11. display: inline-block;
  12. float: none;
  13. a {
  14. border: 0;
  15. color: @link-color-alt;
  16. &:focus,
  17. &:hover {
  18. background-color: transparent !important;
  19. border: 0;
  20. color: @link-hover-color-alt;
  21. }
  22. }
  23. }
  24. li.active > a {
  25. background-color: transparent !important;
  26. border: 0 !important;
  27. border-bottom: 1px solid @accent-color-secondary!important;
  28. color: @accent-color-secondary!important;
  29. &:hover {
  30. border-bottom: 1px solid @accent-color-secondary!important;
  31. color: @accent-color-secondary!important;
  32. }
  33. }
  34. .tab-content:extend(.container) {
  35. background-color: transparent !important;
  36. border: none !important;
  37. }
  38. }
  39. .ol-tabs-scrollable {
  40. // Styling for Website redesign, it will be used in CMS Later on.
  41. max-width: 800px;
  42. margin: 0 auto;
  43. .nav-tabs-container {
  44. overflow-x: auto;
  45. margin-bottom: var(--spacing-11);
  46. text-align: center;
  47. .nav-tabs {
  48. display: inline-flex;
  49. border-bottom: var(--border-width-base) solid var(--neutral-20);
  50. margin: 0 auto;
  51. padding: 0;
  52. text-align: center;
  53. min-width: max-content; // This is for horizontal scrolling
  54. border-top: 2px solid transparent; // so that top focus border is visible
  55. li {
  56. display: inline-block;
  57. float: none;
  58. margin-bottom: calc(var(--border-width-base) * -1);
  59. margin-right: var(--spacing-04);
  60. &:last-child {
  61. margin-right: 0;
  62. }
  63. a {
  64. border: 0;
  65. border-radius: 0;
  66. color: var(--neutral-70);
  67. margin-right: unset;
  68. padding: var(--spacing-04);
  69. line-height: var(--line-height-03);
  70. &:focus,
  71. &:hover {
  72. border: 0;
  73. }
  74. &:focus,
  75. &:focus-visible {
  76. background-color: unset;
  77. outline: 0;
  78. }
  79. &:hover {
  80. background-color: var(--neutral-10);
  81. }
  82. &:focus-visible {
  83. .box-shadow-button-input();
  84. }
  85. }
  86. }
  87. li.active > a {
  88. background-color: transparent !important;
  89. border: 0 !important;
  90. border-bottom: 3px solid var(--green-50) !important;
  91. color: @neutral-90 !important;
  92. &:hover {
  93. border-bottom: 3px solid var(--green-50) !important;
  94. }
  95. }
  96. @media (max-width: @screen-xs-max) {
  97. text-align: left;
  98. }
  99. }
  100. }
  101. .tab-content {
  102. border: 0 !important; //override navs.less
  103. padding: 0 !important; //override navs.less
  104. }
  105. .ol-accordions-container :first-child {
  106. // remove top padding so we have spacing-11 between tab nav and tab content
  107. padding-top: 0px !important;
  108. }
  109. }
  110. // Scroll the page up a bit to allow tab links to be shown when navigating to
  111. // a bookmarked tab hash
  112. [data-ol-bookmarkable-tabset] .tab-pane {
  113. scroll-margin-top: calc(
  114. @line-height-computed + // Computed text height
  115. 20px + // nav-link-padding top & bottom
  116. @padding-md + // ol-tabs bottom padding
  117. (@line-height-computed / 2) // tab-content top padding
  118. );
  119. }