_tabs.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .tabs {
  2. &.tabs-transparent {
  3. background-color: transparent;
  4. .tab a,
  5. .tab.disabled a,
  6. .tab.disabled a:hover {
  7. color: rgba(255,255,255,0.7);
  8. }
  9. .tab a:hover,
  10. .tab a.active {
  11. color: #fff;
  12. }
  13. .indicator {
  14. background-color: #fff;
  15. }
  16. }
  17. &.tabs-fixed-width {
  18. display: flex;
  19. .tab {
  20. flex-grow: 1;
  21. }
  22. }
  23. position: relative;
  24. overflow-x: auto;
  25. overflow-y: hidden;
  26. height: 48px;
  27. width: 100%;
  28. background-color: $tabs-bg-color;
  29. margin: 0 auto;
  30. white-space: nowrap;
  31. .tab {
  32. display: inline-block;
  33. text-align: center;
  34. line-height: 48px;
  35. height: 48px;
  36. padding: 0;
  37. margin: 0;
  38. text-transform: uppercase;
  39. a {
  40. &:focus,
  41. &:focus.active {
  42. background-color: transparentize($tabs-underline-color, .8);
  43. outline: none;
  44. }
  45. &:hover,
  46. &.active {
  47. background-color: transparent;
  48. color: $tabs-text-color;
  49. }
  50. color: rgba($tabs-text-color, .7);
  51. display: block;
  52. width: 100%;
  53. height: 100%;
  54. padding: 0 24px;
  55. font-size: 14px;
  56. text-overflow: ellipsis;
  57. overflow: hidden;
  58. transition: color .28s ease, background-color .28s ease;
  59. }
  60. &.disabled a,
  61. &.disabled a:hover {
  62. color: rgba($tabs-text-color, .4);
  63. cursor: default;
  64. }
  65. }
  66. .indicator {
  67. position: absolute;
  68. bottom: 0;
  69. height: 2px;
  70. background-color: $tabs-underline-color;
  71. will-change: left, right;
  72. }
  73. }
  74. // Fixed Sidenav hide on smaller
  75. @media #{$medium-and-down} {
  76. .tabs {
  77. display: flex;
  78. .tab {
  79. flex-grow: 1;
  80. a {
  81. padding: 0 12px;
  82. }
  83. }
  84. }
  85. }