vertical-tabs.css

Same filename in this branch
  1. 9 core/misc/vertical-tabs.css
  2. 9 core/themes/olivero/css/components/vertical-tabs.css
  3. 9 core/themes/stable9/css/core/vertical-tabs.css
  4. 9 core/themes/seven/css/components/vertical-tabs.css
  5. 9 core/themes/stable/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. 8.9.x core/misc/vertical-tabs.css
  4. 8.9.x core/themes/seven/css/components/vertical-tabs.css
  5. 8.9.x core/themes/claro/css/components/vertical-tabs.css
  6. 8.9.x core/themes/stable/css/core/vertical-tabs.css
  7. 10 core/misc/vertical-tabs.css
  8. 10 core/themes/olivero/css/components/vertical-tabs.css
  9. 10 core/themes/stable9/css/core/vertical-tabs.css
  10. 10 core/themes/claro/css/components/vertical-tabs.css
  11. 11.x core/misc/vertical-tabs.css
  12. 11.x core/themes/olivero/css/components/vertical-tabs.css
  13. 11.x core/themes/stable9/css/core/vertical-tabs.css
  14. 11.x 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-top: 0.75rem;
  19. margin-bottom: 0.75rem;
  20. border-top: 1px solid transparent; /* Need to hide the pane wrapper clearfix's height */
  21. }
  22. @media screen and (-ms-high-contrast: active) {
  23. .vertical-tabs {
  24. border-color: transparent;
  25. }
  26. }
  27. /**
  28. * Vertical tabs menu.
  29. */
  30. .vertical-tabs__menu {
  31. position: relative;
  32. display: block;
  33. float: left; /* LTR */
  34. width: 20em;
  35. margin: 0;
  36. padding-top: 0.5rem;
  37. list-style: none;
  38. color: #232429;
  39. }
  40. [dir="rtl"] .vertical-tabs__menu {
  41. float: right;
  42. margin: 0;
  43. }
  44. /**
  45. * Vertical tabs menu item.
  46. */
  47. .vertical-tabs__menu-item {
  48. overflow: hidden;
  49. margin: -1rem -1px -0.5rem -0.5rem; /* LTR */
  50. padding: 0.5rem 0 0.5rem 0.5rem; /* LTR */
  51. }
  52. [dir="rtl"] .vertical-tabs__menu-item {
  53. margin-right: -0.5rem;
  54. margin-left: -1px;
  55. padding-right: 0.5rem;
  56. padding-left: 0;
  57. }
  58. /**
  59. * These are the (gray) lines that are visually separating the vertical tab menu
  60. * items.
  61. */
  62. .vertical-tabs__menu-item::before,
  63. .vertical-tabs__menu-item::after {
  64. position: absolute;
  65. 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. */
  66. display: block;
  67. width: 100%;
  68. margin-top: -1px;
  69. border-top: 1px solid #d3d4d9;
  70. }
  71. /**
  72. * This pseudo element covers the gray separator line of the vertical tab menu
  73. * item that follows the active one.
  74. *
  75. * Without this, we would have a lightgray line at the bottom-left (LTR) corner
  76. * of the active vertical tab menu item.
  77. *
  78. * Let's call this 'masking' line.
  79. */
  80. .vertical-tabs__menu-item::after {
  81. z-index: 2;
  82. border-color: #fff;
  83. }
  84. /**
  85. * Making the separator line visible only if it follows an unhidden menu item.
  86. */
  87. .vertical-tabs__menu-item:not(.vertical-tab--hidden) ~ .vertical-tabs__menu-item::before {
  88. content: "";
  89. }
  90. /* Menu item states. */
  91. .vertical-tabs__menu-item:focus {
  92. outline: 0;
  93. box-shadow: none;
  94. }
  95. .vertical-tabs__menu-item.is-selected::before,
  96. .vertical-tabs__menu-item:not(.vertical-tab--hidden) ~ .vertical-tabs__menu-item.is-selected::before {
  97. content: normal;
  98. }
  99. /* Make the white masking line displayed for the selected menu item. */
  100. .vertical-tabs__menu-item.is-selected::after {
  101. content: "";
  102. }
  103. /**
  104. * Anchor link inside the vertical tabs menu item.
  105. */
  106. .vertical-tabs__menu-link {
  107. position: relative;
  108. display: block;
  109. margin-top: -1px;
  110. padding: 0.75rem 0.75rem 0.75rem 1.25rem; /* LTR */
  111. text-decoration: none;
  112. word-wrap: break-word;
  113. -webkit-hyphens: auto;
  114. -ms-hyphens: auto;
  115. hyphens: auto;
  116. color: #232429;
  117. border: 1px solid transparent;
  118. border-width: 1px 0 1px 4px; /* LTR */
  119. border-radius: 2px 0 0 2px; /* LTR */
  120. }
  121. [dir="rtl"] .vertical-tabs__menu-link {
  122. padding-right: 1.25rem;
  123. padding-left: 0.75rem;
  124. border-width: 1px 4px 1px 0;
  125. border-radius: 0 2px 2px 0;
  126. }
  127. @media screen and (-ms-high-contrast: active) {
  128. .vertical-tabs__menu-link {
  129. border-color: transparent;
  130. }
  131. }
  132. /* Menu link states. */
  133. .vertical-tabs__menu-link:focus {
  134. 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. */
  135. text-decoration: none;
  136. box-shadow: none;
  137. }
  138. .vertical-tabs__menu-link:hover {
  139. text-decoration: none;
  140. color: #003ecc;
  141. }
  142. /* This pseudo element provides the background for the hover state. */
  143. .vertical-tabs__menu-link::before {
  144. position: absolute;
  145. z-index: 0; /* This should be on a lower level than the menu-item separator lines. */
  146. top: -1px;
  147. right: 0; /* LTR */
  148. bottom: -1px;
  149. left: -0.25rem; /* LTR */
  150. content: "";
  151. pointer-events: none;
  152. background-clip: padding-box;
  153. }
  154. [dir="rtl"] .vertical-tabs__menu-link::before {
  155. right: -0.25rem;
  156. left: 0;
  157. }
  158. .vertical-tabs__menu-link:hover::before {
  159. background: #f5f8ff;
  160. }
  161. .vertical-tabs__menu-link:focus::after {
  162. position: absolute;
  163. top: 0;
  164. right: 0;
  165. bottom: 0;
  166. left: 0;
  167. margin: -1px -0.25rem;
  168. content: "";
  169. pointer-events: none;
  170. border: 3px solid #26a769;
  171. border-radius: 2px;
  172. }
  173. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link {
  174. z-index: 3; /* The selected menu link should be on a higher level than the white masking line that hides the gray separator. */
  175. color: #003ecc;
  176. border-color: #dedfe4 transparent;
  177. background-color: #fff;
  178. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  179. }
  180. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link:hover {
  181. color: #0036b1;
  182. background-color: #f5f8ff;
  183. }
  184. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  185. z-index: 1; /* The blue active-tab indication should be on a higher level than the green focus border. */
  186. border-left: 4px solid #003ecc; /* LTR */
  187. border-radius: 2px 0 0 2px; /* LTR */
  188. }
  189. [dir=rtl] .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  190. border-right: 4px solid #003ecc;
  191. border-left: 0;
  192. border-radius: 0 2px 2px 0;
  193. }
  194. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link:hover::before {
  195. background: none;
  196. }
  197. @media screen and (-ms-high-contrast: active) {
  198. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link {
  199. border-color: windowText transparent;
  200. }
  201. .vertical-tabs__menu-link:focus::after {
  202. border-color: transparent;
  203. }
  204. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  205. border-color: windowText;
  206. }
  207. }
  208. .vertical-tabs__menu-link-content {
  209. position: relative;
  210. 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. */
  211. }
  212. /**
  213. * Details summary in vertical tabs menu link and in the summary of the details.
  214. */
  215. .vertical-tabs__menu-link-summary {
  216. display: block;
  217. color: #55565b;
  218. font-size: 0.889rem;
  219. font-weight: normal;
  220. }
  221. /**
  222. * Wrapper of vertical tabs panes.
  223. */
  224. .vertical-tabs__items {
  225. box-sizing: border-box;
  226. margin-top: 0.75rem;
  227. margin-bottom: 0.75rem;
  228. color: #232429;
  229. border: 1px solid #dedfe4;
  230. border-radius: 2px;
  231. background-color: #fff;
  232. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  233. }
  234. /* This modifier is added by JavaScript (this is inherited from Drupal core). */
  235. .vertical-tabs__panes {
  236. position: relative;
  237. z-index: 1; /* The wrapper of the details of the vertical tabs should be on a higher level than the vertical tabs menu */
  238. top: -1px;
  239. margin-top: 0;
  240. margin-bottom: 0;
  241. }
  242. /* This clearfix makes the pane wrapper at least as tall as the menu. */
  243. .vertical-tabs__panes::after {
  244. display: block;
  245. clear: both;
  246. content: "";
  247. }
  248. .vertical-tabs .vertical-tabs__panes {
  249. margin-left: 20em; /* LTR */
  250. border-top-left-radius: 0; /* LTR */
  251. }
  252. [dir="rtl"] .vertical-tabs .vertical-tabs__panes {
  253. margin-right: 20em;
  254. margin-left: 0;
  255. border-top-left-radius: 2px;
  256. border-top-right-radius: 0;
  257. }
  258. /**
  259. * The actual vertical tabs pane.
  260. *
  261. * This is a claro-details element which in this case is also
  262. * vertical-tabs__item.
  263. */
  264. .vertical-tabs__item {
  265. /* Render on top of the border of vertical-tabs__items. */
  266. margin: -1px -1px 0;
  267. border-radius: 0;
  268. }
  269. .vertical-tabs__item.first {
  270. border-top-left-radius: 2px;
  271. border-top-right-radius: 2px;
  272. }
  273. .vertical-tabs__item.last {
  274. margin-bottom: -1px;
  275. border-bottom-right-radius: 2px;
  276. border-bottom-left-radius: 2px;
  277. }
  278. .js .vertical-tabs .vertical-tabs__item {
  279. overflow: hidden;
  280. margin: 0;
  281. border: 0;
  282. }
  283. .js .vertical-tabs .vertical-tabs__item.first,
  284. .js .vertical-tabs .vertical-tabs__item.last {
  285. border-radius: 0;
  286. }
  287. .js .vertical-tabs .vertical-tabs__item > summary {
  288. display: none;
  289. }

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