vertical-tabs.css 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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
  185. 2px
  186. 4px
  187. rgba(0, 0, 0, 0.1);
  188. }
  189. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link:hover {
  190. color: #0036b1;
  191. background-color: #f0f5fd;
  192. }
  193. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  194. z-index: 1; /* The blue active-tab indication should be on a higher level than the green focus border. */
  195. border-left: 4px solid #003cc5; /* LTR */
  196. border-radius: 2px 0 0 2px; /* LTR */
  197. }
  198. [dir=rtl] .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  199. border-right: 4px solid #003cc5;
  200. border-left: 0;
  201. border-radius: 0 2px 2px 0;
  202. }
  203. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link:hover::before {
  204. background: none;
  205. }
  206. @media screen and (-ms-high-contrast: active) {
  207. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link {
  208. border-color: windowText transparent;
  209. }
  210. .vertical-tabs__menu-link:focus::after {
  211. border-color: transparent;
  212. }
  213. .vertical-tabs__menu-item.is-selected .vertical-tabs__menu-link::before {
  214. border-color: windowText;
  215. }
  216. }
  217. .vertical-tabs__menu-link-content {
  218. position: relative;
  219. 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. */
  220. }
  221. /**
  222. * Details summary in vertical tabs menu link and in the summary of the details.
  223. */
  224. .vertical-tabs__menu-link-summary,
  225. .vertical-tabs__details-summary-summary {
  226. display: block;
  227. color: #545560;
  228. font-size: 0.889rem;
  229. font-weight: normal;
  230. }
  231. /**
  232. * Wrapper of vertical tabs panes.
  233. */
  234. .vertical-tabs__items {
  235. box-sizing: border-box;
  236. margin-top: 0.75rem;
  237. margin-bottom: 0.75rem;
  238. color: #222330;
  239. border: 1px
  240. solid
  241. rgba(216, 217, 224, 0.8);
  242. border-radius: 2px;
  243. background-color: #fff;
  244. box-shadow: 0
  245. 2px
  246. 4px
  247. rgba(0, 0, 0, 0.1);
  248. }
  249. /* This modifier is added by JavaScript (this is inherited from Drupal core). */
  250. .vertical-tabs__items--processed {
  251. position: relative;
  252. z-index: 1; /* The wrapper of the details of the vertical tabs should be on a higher level than the vertical tabs menu */
  253. top: -1px;
  254. margin-top: 0;
  255. margin-bottom: 0;
  256. }
  257. /* This clearfix makes the pane wrapper at least as tall as the menu. */
  258. .vertical-tabs__items--processed::after {
  259. display: block;
  260. clear: both;
  261. content: "";
  262. }
  263. @media screen and (min-width: 85em) {
  264. .vertical-tabs__items--processed {
  265. margin-left: 20em; /* LTR */
  266. border-top-left-radius: 0; /* LTR */
  267. }
  268. .js[dir="rtl"] .vertical-tabs__items--processed {
  269. margin-right: 20em;
  270. margin-left: 0;
  271. border-top-left-radius: 2px;
  272. border-top-right-radius: 0;
  273. }
  274. }
  275. /**
  276. * The actual vertical tabs pane.
  277. *
  278. * This is a claro-details element which in this case is also
  279. * vertical-tabs__item.
  280. */
  281. .vertical-tabs__item {
  282. /* Render on top of the border of vertical-tabs__items. */
  283. margin: -1px -1px 0;
  284. border-radius: 0;
  285. }
  286. .vertical-tabs__item--first {
  287. border-top-left-radius: 2px;
  288. border-top-right-radius: 2px;
  289. }
  290. .vertical-tabs__item--last {
  291. margin-bottom: -1px;
  292. border-bottom-right-radius: 2px;
  293. border-bottom-left-radius: 2px;
  294. }
  295. @media screen and (min-width: 85em) {
  296. .js .vertical-tabs__item {
  297. overflow: hidden;
  298. margin: 0;
  299. border: 0;
  300. }
  301. .js .vertical-tabs__item--first,
  302. .js .vertical-tabs__item--last {
  303. border-radius: 0;
  304. }
  305. .js .vertical-tabs__item > summary {
  306. display: none;
  307. }
  308. }