tabs.css

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css
  2. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/components/tabs.css
  3. 8.9.x core/themes/seven/css/components/tabs.css
  4. 8.9.x core/themes/seven/css/classy/components/tabs.css
  5. 8.9.x core/themes/bartik/css/components/tabs.css
  6. 8.9.x core/themes/bartik/css/classy/components/tabs.css
  7. 8.9.x core/themes/classy/css/components/tabs.css
  8. 8.9.x core/assets/vendor/jquery.ui/themes/base/tabs.css
Same filename and directory in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css
  2. 9 core/profiles/demo_umami/themes/umami/css/components/regions/tabs/tabs.css
  3. 9 core/profiles/demo_umami/themes/umami/css/classy/components/tabs.css
  4. 9 core/themes/olivero/css/components/tabs.css
  5. 9 core/themes/seven/css/components/tabs.css
  6. 9 core/themes/seven/css/classy/components/tabs.css
  7. 9 core/themes/claro/css/components/tabs.css
  8. 9 core/themes/bartik/css/components/tabs.css
  9. 9 core/themes/bartik/css/classy/components/tabs.css
  10. 9 core/themes/starterkit_theme/css/components/tabs.css
  11. 9 core/themes/classy/css/components/tabs.css
  12. 10 core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css
  13. 10 core/profiles/demo_umami/themes/umami/css/components/regions/tabs/tabs.css
  14. 10 core/themes/olivero/css/components/tabs.css
  15. 10 core/themes/claro/css/components/tabs.css
  16. 10 core/themes/starterkit_theme/css/components/tabs.css
  17. 11.x core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css
  18. 11.x core/profiles/demo_umami/themes/umami/css/components/regions/tabs/tabs.css
  19. 11.x core/themes/olivero/css/components/tabs.css
  20. 11.x core/themes/claro/css/components/tabs.css
  21. 11.x core/themes/starterkit_theme/css/components/tabs.css
/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/2815083
 * @preserve
 */

/**
 * Tabs.
 */

:root {
  /**
  * Tabs.
  */ /* 48px */ /* 40px */
}

.tabs-wrapper > nav {
  width: 100%;
}

.tabs {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 0 1.5rem 0;
  border: 1px solid #d4d4d8;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .tabs {
  margin: 0 0 1.5rem 0;
}

.tabs__tab {
  position: relative;
  border-bottom: 1px solid #d4d4d8;
  background-color: #fafbfd;
  font-size: 0.889rem;
  font-weight: bold;
}

.tabs__tab:last-child {
  border-bottom: 0;
}

.tabs__tab.is-active {
  display: flex;
  justify-content: space-between;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tabs__link {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-grow: 1;
  align-items: center;
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: #545560;
  line-height: 1.2rem;
}

.tabs__link:focus {
  min-height: calc(3rem + 2px);
  margin: -1px;
  padding-left: calc(1.5rem - 2px); /* LTR */
  text-decoration: none;
  color: #545560;
  border: 3px solid #26a769;
  border-radius: 2px;
  outline: none;
  box-shadow: none;
}

[dir="rtl"] .tabs__link:focus {
  padding-right: calc(1.5rem - 2px);
  padding-left: 1.5rem;
}

.tabs__link:hover {
  text-decoration: none;
  color: #222330;
}

.tabs__link.is-active {
  z-index: 1;
  flex-grow: 1;
  color: #003cc5;
}

.tabs__link.is-active:focus {
  margin: -1px 0;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
  border-left: none; /* LTR */
  border-radius: 0;
}

.tabs__link:not(.is-active):focus {
  z-index: 3;
}

[dir="rtl"] .tabs__link.is-active:focus {
  border-right: none;
  border-left: 3px solid #26a769;
}

.tabs__link.is-active:hover {
  color: #222330;
}

/* Active and hover indicator. */

.tabs__tab::before,
.tabs__link::before {
  position: absolute;
  display: block;
  content: "";
}

.tabs__tab.is-active::before {
  z-index: 2;
  top: -1px;
  left: -1px; /* LTR */
  width: 3px;
  height: calc(100% + 2px);
  border-left: 3px solid #003cc5; /* LTR */
  border-top-left-radius: 2px; /* LTR */
}

[dir="rtl"] .tabs__tab.is-active::before {
  right: -1px;
  left: auto;
  border-right: 3px solid #003cc5;
  border-left: none;
  border-radius: 0 2px 0 2px;
}

.tabs.is-open .tabs__tab.is-active::before {
  border-bottom-left-radius: 0; /* LTR */
}

[dir="rtl"] .tabs.is-open .tabs__tab.is-active::before {
  border-bottom-right-radius: 2px;
}

.tabs__tab.is-active:focus::before {
  top: -3px;
  height: calc(3rem + 2px);
}

.tabs__tab:not(.is-active) {
  display: none;
}

.tabs--secondary .tabs__tab:not(.is-active) {
  display: block;
}

.tabs.is-open > .tabs__tab {
  display: flex;
}

.tabs__trigger {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  padding-right: 1px;
  text-align: center;
  border-left: 1px solid rgba(216, 217, 224, 0.8); /* LTR */
}

[dir="rtl"] .tabs__trigger {
  border-right: 1px solid rgba(216, 217, 224, 0.8);
  border-left: none;
}

.tabs__trigger:focus {
  padding-right: 0;
  border: 3px solid #26a769;
  border-radius: 2px;
  box-shadow: none;
}

@media screen and (min-width: 48em) {
  .tabs-wrapper {
    display: flex;
  }
  .is-horizontal .tabs {
    flex-direction: row;
    width: auto;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .is-horizontal .tabs--secondary {
    overflow: hidden;
    margin: -6px -6px 0;
    padding: 6px 6px 0;
    border-radius: 0;
  }

  .is-horizontal .tabs--secondary .tabs__tab {
    font-size: 0.889rem;
  }

  .is-horizontal .tabs--secondary .tabs__link {
    min-height: 2.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .is-horizontal .tabs--secondary .tabs__link:focus {
    min-height: 2.5rem;
  }

  .is-horizontal .tabs--secondary::after {
    position: absolute;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    content: "";
    border-bottom: 1px solid #d4d4d8;
  }

  .is-horizontal .tabs__tab {
    border-top: none;
    border-bottom: none;
    background: none;
    font-size: 1rem;
  }
  .is-horizontal .tabs__tab.is-active {
    order: 0;
    background: none;
    box-shadow: none;
  }
  .is-horizontal .tabs__tab.is-active::before {
    content: none;
  }
  .is-horizontal .tabs__tab .tabs__link.is-active::before {
    border-radius: 0;
  }
  .is-horizontal .tabs__trigger {
    display: none;
  }
  .is-horizontal .tabs__tab {
    display: block;
  }

  .is-horizontal .tabs__link {
    padding-right: 2rem;
    padding-left: 2rem;
    border-radius: 2px 2px 0 0;
  }

  .is-horizontal .tabs__link:focus {
    min-height: 3rem;
    margin: 0;
    padding-right: 2rem;
    padding-left: 2rem;
    color: #222330;
    border: none;
    border-radius: 2px 2px 0 0;
    outline: 2px dotted transparent;
    box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769;
  }
  [dir="rtl"] .is-horizontal .tabs__link:focus {
    border: none;
  }
  .is-horizontal .tabs--primary .tabs__link:focus {
    box-shadow: 0 0 0 2px #f3f4f9, 0 0 0 5px #26a769;
  }

  .is-horizontal .tabs__link:hover {
    color: #0036b1;
    background: #e6ecf8;
  }

  .is-horizontal .tabs__link.is-active::before {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-right: none;
    border-bottom: 3px solid #003cc5;
    border-left: none;
  }
}

File

core/themes/claro/css/components/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. * Tabs.
  9. */
  10. :root {
  11. /**
  12. * Tabs.
  13. */ /* 48px */ /* 40px */
  14. }
  15. .tabs-wrapper > nav {
  16. width: 100%;
  17. }
  18. .tabs {
  19. display: flex;
  20. flex-direction: column;
  21. width: 100%;
  22. margin: 0 0 1.5rem 0;
  23. border: 1px solid #d4d4d8;
  24. border-radius: 2px;
  25. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  26. }
  27. [dir="rtl"] .tabs {
  28. margin: 0 0 1.5rem 0;
  29. }
  30. .tabs__tab {
  31. position: relative;
  32. border-bottom: 1px solid #d4d4d8;
  33. background-color: #fafbfd;
  34. font-size: 0.889rem;
  35. font-weight: bold;
  36. }
  37. .tabs__tab:last-child {
  38. border-bottom: 0;
  39. }
  40. .tabs__tab.is-active {
  41. display: flex;
  42. justify-content: space-between;
  43. background-color: #fff;
  44. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  45. }
  46. .tabs__link {
  47. position: relative;
  48. display: flex;
  49. overflow: hidden;
  50. flex-grow: 1;
  51. align-items: center;
  52. box-sizing: border-box;
  53. min-height: 3rem;
  54. padding: 0.75rem 1.5rem;
  55. text-decoration: none;
  56. color: #545560;
  57. line-height: 1.2rem;
  58. }
  59. .tabs__link:focus {
  60. min-height: calc(3rem + 2px);
  61. margin: -1px;
  62. padding-left: calc(1.5rem - 2px); /* LTR */
  63. text-decoration: none;
  64. color: #545560;
  65. border: 3px solid #26a769;
  66. border-radius: 2px;
  67. outline: none;
  68. box-shadow: none;
  69. }
  70. [dir="rtl"] .tabs__link:focus {
  71. padding-right: calc(1.5rem - 2px);
  72. padding-left: 1.5rem;
  73. }
  74. .tabs__link:hover {
  75. text-decoration: none;
  76. color: #222330;
  77. }
  78. .tabs__link.is-active {
  79. z-index: 1;
  80. flex-grow: 1;
  81. color: #003cc5;
  82. }
  83. .tabs__link.is-active:focus {
  84. margin: -1px 0;
  85. padding-right: 1.5rem;
  86. padding-left: 1.5rem;
  87. border-left: none; /* LTR */
  88. border-radius: 0;
  89. }
  90. .tabs__link:not(.is-active):focus {
  91. z-index: 3;
  92. }
  93. [dir="rtl"] .tabs__link.is-active:focus {
  94. border-right: none;
  95. border-left: 3px solid #26a769;
  96. }
  97. .tabs__link.is-active:hover {
  98. color: #222330;
  99. }
  100. /* Active and hover indicator. */
  101. .tabs__tab::before,
  102. .tabs__link::before {
  103. position: absolute;
  104. display: block;
  105. content: "";
  106. }
  107. .tabs__tab.is-active::before {
  108. z-index: 2;
  109. top: -1px;
  110. left: -1px; /* LTR */
  111. width: 3px;
  112. height: calc(100% + 2px);
  113. border-left: 3px solid #003cc5; /* LTR */
  114. border-top-left-radius: 2px; /* LTR */
  115. }
  116. [dir="rtl"] .tabs__tab.is-active::before {
  117. right: -1px;
  118. left: auto;
  119. border-right: 3px solid #003cc5;
  120. border-left: none;
  121. border-radius: 0 2px 0 2px;
  122. }
  123. .tabs.is-open .tabs__tab.is-active::before {
  124. border-bottom-left-radius: 0; /* LTR */
  125. }
  126. [dir="rtl"] .tabs.is-open .tabs__tab.is-active::before {
  127. border-bottom-right-radius: 2px;
  128. }
  129. .tabs__tab.is-active:focus::before {
  130. top: -3px;
  131. height: calc(3rem + 2px);
  132. }
  133. .tabs__tab:not(.is-active) {
  134. display: none;
  135. }
  136. .tabs--secondary .tabs__tab:not(.is-active) {
  137. display: block;
  138. }
  139. .tabs.is-open > .tabs__tab {
  140. display: flex;
  141. }
  142. .tabs__trigger {
  143. display: flex;
  144. flex-shrink: 0;
  145. align-items: center;
  146. justify-content: center;
  147. width: 3rem;
  148. padding-right: 1px;
  149. text-align: center;
  150. border-left: 1px solid rgba(216, 217, 224, 0.8); /* LTR */
  151. }
  152. [dir="rtl"] .tabs__trigger {
  153. border-right: 1px solid rgba(216, 217, 224, 0.8);
  154. border-left: none;
  155. }
  156. .tabs__trigger:focus {
  157. padding-right: 0;
  158. border: 3px solid #26a769;
  159. border-radius: 2px;
  160. box-shadow: none;
  161. }
  162. @media screen and (min-width: 48em) {
  163. .tabs-wrapper {
  164. display: flex;
  165. }
  166. .is-horizontal .tabs {
  167. flex-direction: row;
  168. width: auto;
  169. margin: 0;
  170. border: 0;
  171. box-shadow: none;
  172. }
  173. .is-horizontal .tabs--secondary {
  174. overflow: hidden;
  175. margin: -6px -6px 0;
  176. padding: 6px 6px 0;
  177. border-radius: 0;
  178. }
  179. .is-horizontal .tabs--secondary .tabs__tab {
  180. font-size: 0.889rem;
  181. }
  182. .is-horizontal .tabs--secondary .tabs__link {
  183. min-height: 2.5rem;
  184. padding-top: 0.5rem;
  185. padding-bottom: 0.5rem;
  186. }
  187. .is-horizontal .tabs--secondary .tabs__link:focus {
  188. min-height: 2.5rem;
  189. }
  190. .is-horizontal .tabs--secondary::after {
  191. position: absolute;
  192. bottom: 0;
  193. left: 0;
  194. display: block;
  195. width: 100%;
  196. content: "";
  197. border-bottom: 1px solid #d4d4d8;
  198. }
  199. .is-horizontal .tabs__tab {
  200. border-top: none;
  201. border-bottom: none;
  202. background: none;
  203. font-size: 1rem;
  204. }
  205. .is-horizontal .tabs__tab.is-active {
  206. order: 0;
  207. background: none;
  208. box-shadow: none;
  209. }
  210. .is-horizontal .tabs__tab.is-active::before {
  211. content: none;
  212. }
  213. .is-horizontal .tabs__tab .tabs__link.is-active::before {
  214. border-radius: 0;
  215. }
  216. .is-horizontal .tabs__trigger {
  217. display: none;
  218. }
  219. .is-horizontal .tabs__tab {
  220. display: block;
  221. }
  222. .is-horizontal .tabs__link {
  223. padding-right: 2rem;
  224. padding-left: 2rem;
  225. border-radius: 2px 2px 0 0;
  226. }
  227. .is-horizontal .tabs__link:focus {
  228. min-height: 3rem;
  229. margin: 0;
  230. padding-right: 2rem;
  231. padding-left: 2rem;
  232. color: #222330;
  233. border: none;
  234. border-radius: 2px 2px 0 0;
  235. outline: 2px dotted transparent;
  236. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769;
  237. }
  238. [dir="rtl"] .is-horizontal .tabs__link:focus {
  239. border: none;
  240. }
  241. .is-horizontal .tabs--primary .tabs__link:focus {
  242. box-shadow: 0 0 0 2px #f3f4f9, 0 0 0 5px #26a769;
  243. }
  244. .is-horizontal .tabs__link:hover {
  245. color: #0036b1;
  246. background: #e6ecf8;
  247. }
  248. .is-horizontal .tabs__link.is-active::before {
  249. top: auto;
  250. right: 0;
  251. bottom: 0;
  252. left: 0;
  253. width: 100%;
  254. height: 3px;
  255. border-right: none;
  256. border-bottom: 3px solid #003cc5;
  257. border-left: none;
  258. }
  259. }

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