tabs.less 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. .nav-tabs {
  47. border: 0 !important;
  48. margin: 0 auto;
  49. padding: 0;
  50. text-align: center;
  51. min-width: max-content; // This is for horizontal scrolling
  52. li {
  53. display: inline-block;
  54. float: none;
  55. margin-bottom: 0; //override navs.less
  56. a {
  57. border: 0;
  58. color: @neutral-70;
  59. border-bottom: 3px solid @neutral-20 !important;
  60. margin-right: unset;
  61. padding: var(--spacing-04);
  62. &:focus,
  63. &:hover {
  64. background-color: transparent !important;
  65. border: 0;
  66. }
  67. }
  68. }
  69. li.active > a {
  70. background-color: transparent !important;
  71. border: 0 !important;
  72. border-bottom: 3px solid @emerald-green !important;
  73. color: @neutral-90 !important;
  74. &:hover {
  75. border-bottom: 3px solid @emerald-green !important;
  76. }
  77. }
  78. @media (max-width: @screen-xs-max) {
  79. text-align: left;
  80. }
  81. }
  82. }
  83. .tab-content {
  84. border: 0 !important; //override navs.less
  85. padding: 0 !important; //override navs.less
  86. }
  87. .ol-accordions-container :first-child {
  88. // remove top padding so we have spacing-11 between tab nav and tab content
  89. padding-top: 0px !important;
  90. }
  91. }
  92. // Scroll the page up a bit to allow tab links to be shown when navigating to
  93. // a bookmarked tab hash
  94. [data-ol-bookmarkable-tabset] .tab-pane {
  95. scroll-margin-top: calc(
  96. @line-height-computed + // Computed text height
  97. 20px + // nav-link-padding top & bottom
  98. @padding-md + // ol-tabs bottom padding
  99. (@line-height-computed / 2) // tab-content top padding
  100. );
  101. }