tabs.css 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /**
  2. * Tabs.
  3. */
  4. .is-collapse-enabled .tabs,
  5. .is-horizontal .tabs {
  6. position: relative;
  7. }
  8. .is-collapse-enabled .tabs:before,
  9. .is-horizontal .tabs:before {
  10. content: '';
  11. display: block;
  12. background-color: #a6a6a6;
  13. height: 1px;
  14. position: absolute;
  15. bottom: 0;
  16. left: 0;
  17. z-index: 10;
  18. right: 0;
  19. }
  20. /* Span the full width of the viewport */
  21. .content-header .is-horizontal .tabs:before,
  22. .content-header .is-collapse-enabled .tabs:before {
  23. left: -2.5em;
  24. right: -2.5em;
  25. }
  26. /**
  27. * Tab
  28. *
  29. * 1. Required by some elements such as <button>
  30. * 2. Fixed height needed to ensure alignment with absolutely-positioned
  31. * active tab.
  32. */
  33. .tabs__tab {
  34. position: relative;
  35. display: block;
  36. overflow: hidden;
  37. box-sizing: border-box;
  38. margin: -1px 0 0;
  39. padding: 9px 2em 7px 1em; /* LTR */
  40. width: 100%; /* 1 */
  41. border: 1px solid #bfbfbf;
  42. background-color: rgba(242, 242, 240, 0.7);
  43. color: #0074bd;
  44. text-overflow: ellipsis;
  45. white-space: nowrap;
  46. }
  47. [dir="rtl"] .tabs__tab {
  48. padding-left: 2em;
  49. padding-right: 1em;
  50. }
  51. .tabs__tab:hover,
  52. .tabs__tab:focus {
  53. color: #008ee6;
  54. background-color: #fafaf7;
  55. }
  56. li.tabs__tab {
  57. display: block;
  58. padding: 0;
  59. }
  60. /* This is required to win over specificity of [dir="rtl"] .tabs__tab */
  61. [dir="rtl"] li.tabs__tab {
  62. padding-left: 0;
  63. padding-right: 0;
  64. }
  65. li.tabs__tab a {
  66. padding: 9px 2em 7px 1em; /* LTR */
  67. }
  68. [dir="rtl"] li.tabs__tab a {
  69. padding-left: 2em;
  70. padding-right: 1em;
  71. }
  72. .tabs a:hover,
  73. .tabs a:focus {
  74. text-decoration: none;
  75. }
  76. /* Primary tabs */
  77. .tabs.primary {
  78. clear: both;
  79. margin: 16px 0 0;
  80. margin: 1rem 0 0;
  81. }
  82. .tabs.primary .tabs__tab.is-active {
  83. z-index: 15;
  84. border-color: #a6a6a6;
  85. border-radius: 4px 0 0 0; /* LTR */
  86. background-color: #fff;
  87. color: #004f80;
  88. }
  89. [dir="rtl"] .tabs.primary .tabs__tab.is-active {
  90. border-top-left-radius: 0;
  91. border-top-right-radius: 4px;
  92. }
  93. .tabs.primary a {
  94. background: none;
  95. }
  96. .tabs.primary a:focus {
  97. color: #008ee6;
  98. background-color: #fafaf7;
  99. text-decoration: underline;
  100. }
  101. .tabs.primary .is-active a:focus {
  102. background: none;
  103. text-decoration: underline;
  104. }
  105. /* Only add the arrow if there's space */
  106. @media screen and (min-width: 18.75em) { /* 300px */
  107. .tabs.primary a {
  108. background: url(../../../../misc/icons/0074bd/chevron-right.svg) 99% center no-repeat;
  109. }
  110. [dir="rtl"] .tabs.primary a {
  111. background: url(../../../../misc/icons/0074bd/chevron-left.svg) 1% center no-repeat;
  112. }
  113. .tabs.primary .tabs__tab.is-active a {
  114. background-image: none;
  115. }
  116. }
  117. .tabs__trigger {
  118. display: none;
  119. }
  120. /* JS dependent styling */
  121. .is-collapse-enabled .tabs__trigger {
  122. box-sizing: content-box;
  123. display: block;
  124. position: absolute;
  125. z-index: 10;
  126. right: 0; /* LTR */
  127. top: 2px;
  128. left: auto; /* LTR */
  129. width: 25%;
  130. padding-right: 4px;
  131. padding-left: 4px;
  132. border-left: 0; /* LTR */
  133. border-radius: 0 4px 0 0; /* LTR */
  134. font-family: Arial, sans-serif;
  135. font-size: 1.25em;
  136. letter-spacing: 0.1em;
  137. text-align: center;
  138. outline: 0;
  139. }
  140. [dir="rtl"] .is-collapse-enabled .tabs__trigger {
  141. border-right: 0;
  142. border-left: 1px solid #bfbfbf;
  143. border-radius: 4px 0 0 0;
  144. right: auto;
  145. left: 0;
  146. }
  147. .is-collapse-enabled .tabs {
  148. padding-top: 38px;
  149. max-height: 0;
  150. }
  151. .tabs.is-open {
  152. max-height: 999em;
  153. padding-bottom: 16px;
  154. padding-bottom: 1rem;
  155. }
  156. .is-collapse-enabled .tabs__tab.is-active {
  157. position: absolute;
  158. top: 2px;
  159. left: 0; /* LTR */
  160. width: 75%;
  161. border-bottom: 0;
  162. }
  163. [dir="rtl"] .is-collapse-enabled .tabs__tab.is-active {
  164. left: auto;
  165. right: 0;
  166. }
  167. .is-collapse-enabled .tabs.primary a.is-active:before {
  168. content: none;
  169. }
  170. .is-open .tabs__tab.is-active {
  171. border-color: #a6a6a6;
  172. background-color: #fff;
  173. color: #004f80;
  174. border-bottom: 1px solid #a6a6a6;
  175. }
  176. /* Styles for the horizontal state always take priority */
  177. .is-horizontal .tabs {
  178. max-height: none !important;
  179. padding-top: 0 !important;
  180. overflow: visible;
  181. }
  182. .is-horizontal .tabs__tab {
  183. float: left; /* LTR */
  184. height: auto;
  185. width: auto;
  186. margin: 0 0 -1px;
  187. text-align: center;
  188. border-bottom-color: #a6a6a6;
  189. }
  190. [dir="rtl"] .is-horizontal .tabs__tab {
  191. float: right;
  192. /* This is required to win over specificity of [dir="rtl"] .tabs > li */
  193. margin-left: 0;
  194. }
  195. .is-horizontal .tabs__tab + .tabs__tab {
  196. margin-left: -1px; /* LTR */
  197. }
  198. [dir="rtl"] .is-horizontal .tabs__tab + .tabs__tab {
  199. margin-left: 0;
  200. margin-right: -1px;
  201. }
  202. .is-horizontal .tabs.primary .tabs__tab:first-child {
  203. border-radius: 4px 0 0 0; /* LTR */
  204. }
  205. [dir="rtl"] .is-horizontal .tabs.primary .tabs__tab:first-child {
  206. border-radius: 0 4px 0 0;
  207. }
  208. .is-horizontal .tabs.primary .tabs__tab:last-child {
  209. border-radius: 0 4px 0 0; /* LTR */
  210. }
  211. [dir="rtl"] .is-horizontal .tabs.primary .tabs__tab:last-child {
  212. border-radius: 4px 0 0 0;
  213. }
  214. /* Override the states above */
  215. .is-horizontal .tabs__tab.is-active,
  216. .is-horizontal .tabs.primary .tabs__tab.is-active,
  217. [dir="rtl"] .is-horizontal .tabs.primary .tabs__tab.is-active {
  218. border-radius: 4px 4px 0 0;
  219. position: relative;
  220. width: auto;
  221. top: 0;
  222. border-bottom: 0;
  223. margin: 0 -4px;
  224. }
  225. .is-horizontal .tabs.primary a {
  226. background-image: none;
  227. padding: 7px 2em 7px 2em;
  228. }
  229. .is-horizontal .tabs__trigger {
  230. display: none;
  231. }
  232. /* Secondary tabs */
  233. .tabs.secondary {
  234. display: block;
  235. margin-top: 16px;
  236. margin-top: 1rem;
  237. }
  238. .tabs.secondary .tabs__tab {
  239. display: block;
  240. padding: 5px 15px 5px 16px; /* LTR */
  241. margin-left: -1px; /* LTR */
  242. color: #0074bd;
  243. -webkit-transition: border-color 0.2s, background-color 0.2s;
  244. transition: border-color 0.2s, background-color 0.2s;
  245. }
  246. [dir="rtl"] .tabs.secondary .tabs__tab {
  247. padding-left: 15px;
  248. padding-right: 16px;
  249. margin-left: 0;
  250. margin-right: -1px;
  251. }
  252. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary .tabs__tab */
  253. [dir="rtl"] .views-displays .tabs.secondary li,
  254. [dir="rtl"] .views-displays .tabs.secondary li.is-active {
  255. padding-left: 0;
  256. padding-right: 0;
  257. }
  258. .tabs.secondary .tabs__tab + .tabs__tab {
  259. border-top: 1px solid #d9d8d4;
  260. }
  261. .tabs.secondary .tabs__tab.is-active {
  262. color: #004f80;
  263. border-left: 2px solid #004f80; /* LTR */
  264. padding-left: 15px; /* LTR */
  265. }
  266. [dir="rtl"] .tabs.secondary .tabs__tab.is-active {
  267. border-left: 1px solid #bfbfbf;
  268. border-right: 2px solid #004f80;
  269. padding-right: 15px;
  270. }
  271. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary .tabs__tab.is-active */
  272. [dir="rtl"] .views-displays .tabs.secondary li.is-active {
  273. border: 0 none;
  274. padding-right: 0;
  275. }
  276. .tabs.secondary .tabs__tab:hover,
  277. .tabs.secondary .tabs__tab:focus {
  278. color: #008ee6;
  279. border-left: 2px solid #008ee6; /* LTR */
  280. padding-left: 15px; /* LTR */
  281. }
  282. [dir="rtl"] .tabs.secondary .tabs__tab:hover,
  283. [dir="rtl"] .tabs.secondary .tabs__tab:focus {
  284. border-left: 1px solid #bfbfbf;
  285. border-right: 2px solid #008ee6;
  286. padding-right: 15px;
  287. }
  288. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary .tabs__tab:hover */
  289. [dir="rtl"] .views-displays .tabs li.tabs__tab:hover {
  290. border: 0 none;
  291. padding-right: 0;
  292. }
  293. .tabs.secondary a {
  294. background-color: transparent;
  295. padding: 7px 13px 5px;
  296. text-decoration: none;
  297. }
  298. /* This is required to win over specificity of [dir="rtl"] li.tabs__tab a */
  299. [dir="rtl"] .tabs.secondary a {
  300. padding-left: 13px;
  301. padding-right: 13px;
  302. }
  303. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary a */
  304. [dir="rtl"] .views-displays .tabs.secondary a {
  305. padding-left: 7px;
  306. padding-right: 7px;
  307. }
  308. .tabs.secondary .is-active a {
  309. color: #004f80;
  310. }
  311. .tabs.secondary a:focus {
  312. text-decoration: underline;
  313. }
  314. /* Styles for the horizontal state */
  315. .is-horizontal .tabs.secondary .tabs__tab {
  316. background: none;
  317. float: left; /* LTR */
  318. position: relative;
  319. top: 0;
  320. z-index: 15;
  321. margin-left: 1em;
  322. margin-right: 1em;
  323. border-bottom: 2px solid transparent;
  324. border-left: 1px solid transparent; /* LTR */
  325. border-right-color: transparent; /* LTR */
  326. border-top: 0;
  327. padding: 0;
  328. }
  329. /**
  330. * 1. This is required to win over specificity of
  331. * [dir="rtl"] .tabs.secondary .tabs__tab:hover,
  332. * [dir="rtl"] .tabs.secondary .tabs__tab:focus
  333. */
  334. [dir="rtl"] .is-horizontal .tabs.secondary .tabs__tab {
  335. float: right;
  336. border-right: 1px solid transparent;
  337. border-left-color: transparent;
  338. padding-right: 0; /* 1 */
  339. }
  340. .is-horizontal .tabs.secondary .tabs__tab.is-active {
  341. border-bottom-color: #004f80;
  342. }
  343. .is-horizontal .tabs.secondary .tabs__tab:hover,
  344. .is-horizontal .tabs.secondary .tabs__tab:focus {
  345. border-bottom-color: #008ee6;
  346. }