2
0

_tabs.scss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. .tab-nav {
  2. @include row();
  3. padding: 0;
  4. background: $color-grey-4;
  5. li {
  6. list-style-type: none;
  7. width: 33%;
  8. float: left;
  9. padding: 0;
  10. position: relative;
  11. margin-right: 2px;
  12. &:first-of-type {
  13. padding-left: $desktop-nice-padding;
  14. margin-left: 0;
  15. }
  16. }
  17. h2 {
  18. margin: 0;
  19. font-size: inherit;
  20. }
  21. a {
  22. @include transition(border-color 0.2s ease);
  23. background-color: $color-teal-darker;
  24. text-transform: uppercase;
  25. font-weight: 600;
  26. text-decoration: none;
  27. display: block;
  28. padding: 0.6em 0.7em 0.8em;
  29. color: $color-white;
  30. border-top: 0.3em solid $color-teal-darker;
  31. max-height: 1.44em;
  32. overflow: hidden;
  33. &:hover {
  34. color: $color-white;
  35. border-top-color: rgba(0, 0, 0, 0.35);
  36. }
  37. }
  38. a.errors {
  39. &:after {
  40. border-radius: 50px;
  41. box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.1);
  42. position: absolute;
  43. right: -0.5em;
  44. top: -0.5em;
  45. z-index: 5;
  46. min-width: 0.9em;
  47. color: $color-white;
  48. background: $color-red;
  49. content: attr(data-count);
  50. padding: 0 0.3em;
  51. line-height: 1.4em;
  52. text-align: center;
  53. font-size: 0.8em;
  54. }
  55. }
  56. li.active a {
  57. box-shadow: none;
  58. color: $color-grey-1;
  59. background-color: $color-white;
  60. border-top: 0.3em solid $color-grey-1;
  61. }
  62. // For cases where tab-nav should merge with header
  63. &.merged {
  64. margin-top: 0;
  65. background-color: $color-header-bg;
  66. }
  67. li.right {
  68. float: right;
  69. margin-right: 0;
  70. margin-left: 2px;
  71. }
  72. li.wide {
  73. width: unset;
  74. }
  75. .right {
  76. max-height: 1.44em;
  77. overflow: visible;
  78. }
  79. }
  80. .tab-content {
  81. > section {
  82. display: none;
  83. padding-top: 1em;
  84. &.active {
  85. display: block;
  86. }
  87. }
  88. .page-locked & {
  89. cursor: not-allowed;
  90. user-select: none;
  91. > * {
  92. pointer-events: none;
  93. }
  94. }
  95. }
  96. @include media-breakpoint-up(sm) {
  97. .tab-nav {
  98. // For cases where tab-nav should merge with header
  99. &.merged {
  100. background-color: $color-header-bg;
  101. }
  102. li {
  103. width: auto;
  104. padding: 0;
  105. }
  106. a {
  107. padding-left: $mobile-nice-padding;
  108. padding-right: $mobile-nice-padding;
  109. }
  110. li.settings a {
  111. padding-left: 2em;
  112. padding-right: 2em;
  113. }
  114. }
  115. .modal-content .tab-nav li {
  116. padding: 0;
  117. min-width: 0;
  118. &:first-of-type {
  119. padding-left: $desktop-nice-padding;
  120. }
  121. }
  122. }
  123. @include media-breakpoint-down(xs) {
  124. // To allow tabs on the edit page to be editable
  125. .tab-nav li:first-of-type {
  126. padding-left: 1.6em;
  127. }
  128. .tab-nav li {
  129. width: auto;
  130. }
  131. }
  132. // Media for Windows High Contrast
  133. @media (forced-colors: $media-forced-colours) {
  134. .tab-nav li.active a {
  135. border-bottom: 0.3em solid $system-color-link-text;
  136. }
  137. }