_tabs.scss 3.1 KB

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