vertical-tabs.css

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

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