vertical-tabs.css

Same filename in this branch
  1. 11.x core/misc/vertical-tabs.css
  2. 11.x core/themes/olivero/css/components/vertical-tabs.css
  3. 11.x core/themes/stable9/css/core/vertical-tabs.css
Same filename in other branches
  1. 7.x misc/vertical-tabs.css
  2. 7.x themes/seven/vertical-tabs.css
  3. 9 core/misc/vertical-tabs.css
  4. 9 core/themes/olivero/css/components/vertical-tabs.css
  5. 9 core/themes/stable9/css/core/vertical-tabs.css
  6. 9 core/themes/seven/css/components/vertical-tabs.css
  7. 9 core/themes/claro/css/components/vertical-tabs.css
  8. 9 core/themes/stable/css/core/vertical-tabs.css
  9. 8.9.x core/misc/vertical-tabs.css
  10. 8.9.x core/themes/seven/css/components/vertical-tabs.css
  11. 8.9.x core/themes/claro/css/components/vertical-tabs.css
  12. 8.9.x core/themes/stable/css/core/vertical-tabs.css
  13. 10 core/misc/vertical-tabs.css
  14. 10 core/themes/olivero/css/components/vertical-tabs.css
  15. 10 core/themes/stable9/css/core/vertical-tabs.css
  16. 10 core/themes/claro/css/components/vertical-tabs.css

Vertical tabs module.

Replaces /core/misc/vertical-tabs.css.

File

core/themes/claro/css/components/vertical-tabs.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Vertical tabs module.
  10. *
  11. * Replaces /core/misc/vertical-tabs.css.
  12. */
  13. /**
  14. * Main wrapper of vertical tabs.
  15. * This wrapper div is added by JavaScript.
  16. */
  17. .vertical-tabs {
  18. margin-block: var(--vertical-tabs-margin-vertical);
  19. border-block-start: 1px solid transparent; /* Need to hide the pane wrapper clearfix's height */
  20. }
  21. /**
  22. * Vertical tabs menu.
  23. */
  24. .vertical-tabs__menu {
  25. position: relative;
  26. display: block;
  27. float: left; /* LTR */
  28. width: var(--vertical-tabs-menu-width);
  29. margin: 0;
  30. padding-block-start: var(--vertical-tabs-menu-item-shadow-extraspace);
  31. list-style: none;
  32. color: var(--color-text);
  33. }
  34. [dir="rtl"] .vertical-tabs__menu {
  35. float: right;
  36. }
  37. /**
  38. * Vertical tabs menu item.
  39. */
  40. .vertical-tabs__menu-item {
  41. overflow: hidden;
  42. margin-block: var(--vertical-tabs-menu-item--top-margin);
  43. margin-inline: var(--vertical-tabs-menu-item--left-margin) var(--vertical-tabs-menu-item--right-margin);
  44. padding-block: var(--vertical-tabs-menu-item-shadow-extraspace);
  45. padding-inline: var(--vertical-tabs-menu-item-shadow-extraspace) 0;
  46. }
  47. /**
  48. * These are the (gray) lines that are visually separating the vertical tab menu
  49. * items.
  50. */
  51. .vertical-tabs__menu-item::before,
  52. .vertical-tabs__menu-item::after {
  53. position: absolute;
  54. z-index: 1; /* The line should be kept above the vertical tabs menu link to keep it visible even if the link is hovered and gets the 'hover' background color. */
  55. display: block;
  56. width: 100%;
  57. margin-block-start: calc(var(--vertical-tabs-menu-separator-size) * -1);
  58. border-block-start: var(--vertical-tabs-menu-separator-size) solid var(--vertical-tabs-menu-separator-color);
  59. }
  60. /**
  61. * This pseudo element covers the gray separator line of the vertical tab menu
  62. * item that follows the active one.
  63. *
  64. * Without this, we would have a lightgray line at the bottom-left (LTR) corner
  65. * of the active vertical tab menu item.
  66. *
  67. * Let's call this 'masking' line.
  68. */
  69. .vertical-tabs__menu-item::after {
  70. z-index: 2;
  71. border-color: var(--color-white);
  72. }
  73. /**
  74. * Making the separator line visible only if it follows an unhidden menu item.
  75. */
  76. .vertical-tabs__menu-item:not(.vertical-tab--hidden) ~ .vertical-tabs__menu-item::before {
  77. content: "";
  78. }
  79. /* Menu item states. */
  80. .vertical-tabs__menu-item:focus {
  81. outline: 0;
  82. box-shadow: none;
  83. }
  84. .vertical-tabs__menu-item.is-selected::before,
  85. .vertical-tabs__menu-item:not(.vertical-tab--hidden) ~ .vertical-tabs__menu-item.is-selected::before {
  86. content: normal;
  87. }
  88. /* Make the white masking line displayed for the selected menu item. */
  89. .vertical-tabs__menu-item.is-selected::after {
  90. content: "";
  91. }
  92. /**
  93. * Anchor link inside the vertical tabs menu item.
  94. */
  95. .vertical-tabs__menu-link {
  96. position: relative;
  97. display: block;
  98. margin-block-start: calc(var(--vertical-tabs-border-size) * -1);
  99. padding: var(--space-s) var(--space-s) var(--space-s) calc(var(--space-l) - var(--vertical-tabs-menu-link--active-border-size));
  100. -webkit-text-decoration: none;
  101. text-decoration: none;
  102. color: var(--color-text);
  103. border: var(--vertical-tabs-border-size) solid transparent;
  104. border-block-width: var(--vertical-tabs-border-size);
  105. border-inline-width: var(--vertical-tabs-menu-link--active-border-size) 0;
  106. border-start-start-radius: var(--vertical-tabs-border-radius);
  107. border-start-end-radius: 0;
  108. border-end-end-radius: 0;
  109. border-end-start-radius: var(--vertical-tabs-border-radius);
  110. }
  111. .vertical-tabs__menu-link:focus {
  112. z-index: 4; /* Focus state should be on the highest level to make the focus effect be fully visible. This also means that it should have bigger z-index than the selected link. */
  113. -webkit-text-decoration: none;
  114. text-decoration: none;
  115. box-shadow: none;
  116. }
  117. .vertical-tabs__menu-link:focus::after {
  118. position: absolute;
  119. inset: 0;
  120. margin: calc(var(--vertical-tabs-border-size) * -1) calc(var(--vertical-tabs-menu-link--active-border-size) * -1);
  121. content: "";
  122. pointer-events: none;
  123. border: var(--vertical-tabs-menu-link-focus-border-size) solid var(--color-focus);
  124. border-radius: var(--vertical-tabs-border-radius);
  125. }
  126. .vertical-tabs__menu-link:hover {
  127. -webkit-text-decoration: none;
  128. text-decoration: none;
  129. color: var(--color-absolutezero);
  130. }
  131. .vertical-tabs__menu-link:hover::before {
  132. background: var(--color-bgblue-hover);
  133. }
  134. .vertical-tabs__menu-link::before {
  135. position: absolute;
  136. z-index: 0; /* This should be on a lower level than the menu-item separator lines. */
  137. inset-block: calc(var(--vertical-tabs-border-size) * -1);
  138. inset-inline: calc(var(--vertical-tabs-menu-link--active-border-size) * -1) 0;
  139. content: "";
  140. pointer-events: none;
  141. background-clip: padding-box;
  142. }
  143. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link {
  144. z-index: 3; /* The selected menu link should be on a higher level than the white masking line that hides the gray separator. */
  145. color: var(--color-absolutezero);
  146. border-color: var(--vertical-tabs-border-color) transparent;
  147. background-color: var(--color-white);
  148. box-shadow: var(--vertical-tabs-shadow);
  149. }
  150. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link:hover {
  151. color: var(--color-absolutezero-hover);
  152. background-color: var(--color-bgblue-hover);
  153. }
  154. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  155. z-index: 1; /* The blue active-tab indication should be on a higher level than the green focus border. */
  156. border-inline-start: var(--vertical-tabs-menu-link--active-border-size) solid var(--vertical-tabs-menu-link--active-border-color);
  157. border-radius: var(--base-border-radius) 0 0 var(--base-border-radius);
  158. border-start-start-radius: var(--base-border-radius);
  159. border-start-end-radius: 0;
  160. border-end-end-radius: 0;
  161. border-end-start-radius: var(--base-border-radius);
  162. }
  163. @media (forced-colors: active) {
  164. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  165. border-inline-start: var(--vertical-tabs-menu-link--active-border-size) solid canvastext;
  166. }
  167. }
  168. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link:hover::before {
  169. background: none;
  170. }
  171. .vertical-tabs__menu-link-content {
  172. position: relative;
  173. z-index: 1; /* We are using a pseudo element for displaying the hover state's background, and we have to keep the link content above that pseudo element. Without this, the text would be covered by the background. */
  174. }
  175. /**
  176. * Details summary in vertical tabs menu link and in the summary of the details.
  177. */
  178. .vertical-tabs__menu-link-summary {
  179. display: block;
  180. color: var(--color-gray-800);
  181. font-size: var(--font-size-s);
  182. font-weight: normal;
  183. }
  184. /**
  185. * Wrapper of vertical tabs panes.
  186. */
  187. .vertical-tabs__items {
  188. box-sizing: border-box;
  189. margin-block: var(--vertical-tabs-margin-vertical);
  190. color: var(--color-text);
  191. border: var(--vertical-tabs-border);
  192. border-radius: var(--vertical-tabs-border-radius);
  193. background-color: var(--color-white);
  194. box-shadow: var(--vertical-tabs-shadow);
  195. }
  196. /* This modifier is added by JavaScript (this is inherited from Drupal core). */
  197. .vertical-tabs__panes {
  198. position: relative;
  199. z-index: 1; /* The wrapper of the details of the vertical tabs should be on a higher level than the vertical tabs menu */
  200. inset-block-start: -1px;
  201. margin-block: 0;
  202. }
  203. .vertical-tabs__panes::after {
  204. display: block; /* This clearfix makes the pane wrapper at least as tall as the menu. */
  205. clear: both;
  206. content: "";
  207. }
  208. .vertical-tabs .vertical-tabs__panes {
  209. margin-inline-start: var(--vertical-tabs-menu-width);
  210. border-top-left-radius: 0;
  211. }
  212. [dir="rtl"] :is(.vertical-tabs .vertical-tabs__panes) {
  213. border-top-left-radius: var(--vertical-tabs-border-radius);
  214. }
  215. /**
  216. * The actual vertical tabs pane.
  217. *
  218. * This is a claro-details element which in this case is also
  219. * vertical-tabs__item.
  220. */
  221. .vertical-tabs__item {
  222. /* Render on top of the border of vertical-tabs__items. */
  223. margin: calc(var(--vertical-tabs-border-size) * -1) calc(var(--vertical-tabs-border-size) * -1) 0;
  224. border-radius: 0;
  225. }
  226. .vertical-tabs__item.first {
  227. border-top-left-radius: var(--details-accordion-border-size-radius);
  228. border-top-right-radius: var(--details-accordion-border-size-radius);
  229. }
  230. .vertical-tabs__item.last {
  231. margin-bottom: calc(var(--vertical-tabs-border-size) * -1);
  232. border-bottom-right-radius: var(--details-accordion-border-size-radius);
  233. border-bottom-left-radius: var(--details-accordion-border-size-radius);
  234. }
  235. .js .vertical-tabs .vertical-tabs__item {
  236. overflow: hidden;
  237. margin: 0;
  238. border: 0;
  239. }
  240. .js .vertical-tabs .vertical-tabs__item.first,
  241. .js .vertical-tabs .vertical-tabs__item.last {
  242. border-radius: 0;
  243. }
  244. .js .vertical-tabs .vertical-tabs__item > summary {
  245. display: none;
  246. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.