_tabs.scss 3.1 KB

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