tabs.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. /**
  2. * Tab
  3. *
  4. */
  5. .tabs__tab {
  6. position: relative;
  7. display: block;
  8. overflow: hidden;
  9. box-sizing: border-box;
  10. margin: 0;
  11. width: 100%; /* 1 */
  12. text-overflow: ellipsis;
  13. white-space: nowrap;
  14. }
  15. .tabs__tab:hover,
  16. .tabs__tab:focus {
  17. background-color: #f9f9f9;
  18. }
  19. li.tabs__tab {
  20. display: block;
  21. padding: 0;
  22. }
  23. /* This is required to win over specifity of [dir="rtl"] .tabs__tab */
  24. [dir="rtl"] li.tabs__tab {
  25. padding-left: 0;
  26. padding-right: 0;
  27. }
  28. li.tabs__tab a {
  29. display: flex;
  30. padding: 10px 20px; /* LTR */
  31. }
  32. .tabs a:hover,
  33. .tabs a:focus {
  34. text-decoration: none;
  35. }
  36. /* Primary tabs */
  37. .tabs.primary {
  38. clear: both;
  39. margin: 0;
  40. padding: 0;
  41. }
  42. .tabs.primary .tabs__tab .is-active {
  43. z-index: 15;
  44. background-color: white;
  45. }
  46. .tabs__trigger {
  47. display: none;
  48. }
  49. /* JS dependent styling */
  50. .is-collapse-enabled .tabs__tab a {
  51. background: white;
  52. }
  53. .is-collapse-enabled .tabs__trigger {
  54. box-sizing: content-box;
  55. display: block;
  56. position: absolute;
  57. z-index: 10;
  58. right: 0; /* LTR */
  59. top: 0;
  60. left: auto; /* LTR */
  61. width: 25%;
  62. padding-right: 0;
  63. padding-left: 0;
  64. border-left: 0; /* LTR */
  65. font-family: Arial, sans-serif;
  66. font-size: 16px;
  67. line-height: 45px;
  68. letter-spacing: 0.1em;
  69. text-align: center;
  70. color: #0678be;
  71. }
  72. .is-collapse-enabled .tabs__trigger:focus {
  73. outline: transparent;
  74. }
  75. [dir="rtl"] .is-collapse-enabled .tabs__trigger {
  76. right: auto;
  77. left: 0;
  78. }
  79. .is-collapse-enabled .tabs {
  80. padding-top: 45px;
  81. max-height: 0;
  82. }
  83. .tabs.is-open {
  84. max-height: 999em;
  85. padding-bottom: 0;
  86. }
  87. .is-collapse-enabled .tabs__tab.is-active {
  88. position: absolute;
  89. top: 0;
  90. left: 0; /* LTR */
  91. width: 75%;
  92. border-bottom: 0;
  93. }
  94. [dir="rtl"] .is-collapse-enabled .tabs__tab.is-active {
  95. left: auto;
  96. right: 0;
  97. }
  98. .is-collapse-enabled .tabs.primary a.is-active:before {
  99. content: none;
  100. }
  101. .is-open .tabs__tab.is-active {
  102. border-color: #a6a6a6;
  103. background-color: #fff;
  104. color: #004f80;
  105. }
  106. /* Styles for the horizontal state always take priority */
  107. .is-horizontal .tabs {
  108. max-height: none;
  109. padding-top: 0;
  110. overflow: visible;
  111. }
  112. .is-horizontal .tabs__tab {
  113. float: left; /* LTR */
  114. height: auto;
  115. width: auto;
  116. margin: 0;
  117. text-align: center;
  118. border-bottom-color: #a6a6a6;
  119. }
  120. [dir="rtl"] .is-horizontal .tabs__tab {
  121. float: right;
  122. /* This is required to win over specifity of [dir="rtl"] .tabs > li */
  123. margin-left: 0;
  124. }
  125. .is-horizontal .tabs__tab + .tabs__tab {
  126. margin-left: 0; /* LTR */
  127. }
  128. [dir="rtl"] .is-horizontal .tabs__tab + .tabs__tab {
  129. margin-left: 0;
  130. margin-right: 0;
  131. }
  132. /* Override the states above */
  133. .is-horizontal .tabs__tab.is-active,
  134. .is-horizontal .tabs.primary .tabs__tab.is-active,
  135. [dir="rtl"] .is-horizontal .tabs.primary .tabs__tab.is-active {
  136. position: relative;
  137. width: auto;
  138. top: 0;
  139. border-bottom: 0;
  140. margin: 0;
  141. background: white;
  142. }
  143. .is-horizontal .tabs.primary a {
  144. background-image: none;
  145. }
  146. .is-horizontal .tabs__trigger {
  147. display: none;
  148. }
  149. /* Secondary tabs */
  150. .tabs.secondary {
  151. display: block;
  152. margin: 16px 0 0 0;
  153. padding: 0;
  154. }
  155. .tabs.secondary .tabs__tab {
  156. display: block;
  157. padding: 0;
  158. margin: 0;
  159. -webkit-transition: border-color 0.2s, background-color 0.2s;
  160. transition: border-color 0.2s, background-color 0.2s;
  161. }
  162. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary .tabs__tab */
  163. [dir="rtl"] .views-displays .tabs.secondary li,
  164. [dir="rtl"] .views-displays .tabs.secondary li.is-active {
  165. padding-left: 0;
  166. padding-right: 0;
  167. }
  168. .tabs.secondary .tabs__tab.is-active {
  169. color: #0678be;
  170. border-left: 2px solid #0678be; /* LTR */
  171. margin-left: -2px; /* LTR */
  172. }
  173. [dir="rtl"] .tabs.secondary .tabs__tab.is-active {
  174. border-left: none;
  175. border-right: 2px solid #0678be;
  176. margin-right: -2px;
  177. margin-left: 0;
  178. }
  179. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary .tabs__tab.is-active */
  180. [dir="rtl"] .views-displays .tabs.secondary li.is-active {
  181. border: 0 none;
  182. padding-right: 0;
  183. }
  184. .tabs.secondary .tabs__tab:hover,
  185. .tabs.secondary .tabs__tab:focus {
  186. background: none;
  187. }
  188. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary .tabs__tab:hover */
  189. [dir="rtl"] .views-displays .tabs li.tabs__tab:hover {
  190. border: 0 none;
  191. padding-right: 0;
  192. }
  193. .tabs.secondary a {
  194. background-color: transparent;
  195. padding: 5px 20px;
  196. text-decoration: none;
  197. }
  198. /* This is required to win over specificity of [dir="rtl"] .tabs.secondary a */
  199. [dir="rtl"] .views-displays .tabs.secondary a {
  200. padding-left: 7px;
  201. padding-right: 7px;
  202. }
  203. .tabs.secondary .is-active a {
  204. color: #0678be;
  205. }
  206. /* Styles for the horizontal state */
  207. .is-horizontal .tabs.secondary .tabs__tab {
  208. background: none;
  209. float: left; /* LTR */
  210. position: relative;
  211. top: 0;
  212. z-index: 15;
  213. margin-left: 10px;
  214. margin-right: 10px;
  215. border-bottom: 2px solid transparent;
  216. border-left: 1px solid transparent; /* LTR */
  217. border-right-color: transparent; /* LTR */
  218. border-top: 0;
  219. padding: 0;
  220. }
  221. .is-horizontal .tabs.secondary .tabs__tab:first-child {
  222. margin-left: 0;
  223. }
  224. /**
  225. * 1. This is required to win over specifity of
  226. * [dir="rtl"] .tabs.secondary .tabs__tab:hover,
  227. * [dir="rtl"] .tabs.secondary .tabs__tab:focus
  228. */
  229. [dir="rtl"] .is-horizontal .tabs.secondary .tabs__tab {
  230. float: right;
  231. border-right: 1px solid transparent;
  232. border-left-color: transparent;
  233. padding-right: 0; /* 1 */
  234. }
  235. .is-horizontal .tabs.secondary .tabs__tab.is-active {
  236. border-bottom-color: #0678be;
  237. }
  238. .is-horizontal .tabs.secondary .tabs__tab:hover,
  239. .is-horizontal .tabs.secondary .tabs__tab:focus {
  240. border-bottom-color: #63a4cc;
  241. }
  242. /* ui tabs */
  243. .ui-tabs fieldset:not(.fieldgroup) {
  244. background-color: white;
  245. margin: 0 0 20px 0;
  246. padding: 55px 0 0 0;
  247. }
  248. .ui-tabs .ui-tabs-panel {
  249. padding: 20px 0 0 0;
  250. }
  251. .ui-tabs .ui-tabs-nav {
  252. border-bottom: 0;
  253. padding: 0;
  254. background: 0;
  255. }
  256. .ui-tabs .ui-tabs-nav li.ui-tabs-active {
  257. padding-bottom: 0;
  258. background: none;
  259. border-bottom: 2px solid #0678be;
  260. border-radius: 0;
  261. }
  262. .ui-tabs .ui-tabs-nav li.ui-tabs-active:hover,
  263. .ui-tabs .ui-tabs-nav li:hover {
  264. border-bottom: 2px solid #63a4cc;
  265. background: none;
  266. border-radius: 0;
  267. }
  268. .ui-tabs .ui-tabs-nav li {
  269. padding: 0;
  270. border-radius: 0;
  271. margin-left: 10px;
  272. margin-right: 10px;
  273. border-bottom: 2px solid transparent;
  274. }
  275. .ui-tabs .ui-tabs-nav li:first-child {
  276. margin-left: 0;
  277. }
  278. .ui-tabs .ui-tabs-nav li a {
  279. padding: 10px 20px;
  280. line-height: 1.8;
  281. display: flex;
  282. border-radius: 0;
  283. }