dropbutton.component.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. /**
  2. * @file
  3. * Styling dropbuttons.
  4. */
  5. /**
  6. * Reset styling for all elements.
  7. */
  8. .js .dropbutton .dropbutton-action > input,
  9. .js .dropbutton .dropbutton-action > a,
  10. .js .dropbutton .dropbutton-action > button {
  11. color: #333;
  12. text-decoration: none;
  13. padding: 0;
  14. margin: 0;
  15. font-weight: 600;
  16. line-height: normal;
  17. -webkit-font-smoothing: antialiased;
  18. text-align: left; /* LTR */
  19. }
  20. [dir="rtl"].js .dropbutton .dropbutton-action > input,
  21. [dir="rtl"].js .dropbutton .dropbutton-action > a,
  22. [dir="rtl"].js .dropbutton .dropbutton-action > button {
  23. text-align: right;
  24. margin-left: 0; /* This is required to win over specificity of [dir="rtl"] .dropbutton-multiple .dropbutton .dropbutton-action > * */
  25. }
  26. .js .dropbutton-action.last {
  27. border-radius: 0 0 0 1em; /* LTR */
  28. }
  29. [dir="rtl"] .js .dropbutton-action.last {
  30. border-radius: 0 0 1em 0;
  31. }
  32. /**
  33. * Overwrite Sevens button styling.
  34. */
  35. .js .dropbutton-widget .button {
  36. background: transparent;
  37. border: 0;
  38. border-radius: 0;
  39. box-shadow: none;
  40. }
  41. .js .dropbutton-multiple .dropbutton {
  42. border-right: 0; /* LTR */
  43. }
  44. [dir="rtl"].js .dropbutton-multiple .dropbutton {
  45. border-left: 0;
  46. }
  47. /**
  48. * Show dropbutton elements as buttons when javascript is disabled
  49. */
  50. .dropbutton {
  51. margin: 0;
  52. padding: 0;
  53. list-style-type: none;
  54. }
  55. .dropbutton li + li {
  56. margin-top: 10px;
  57. }
  58. .js .dropbutton li {
  59. margin-bottom: 0;
  60. margin-right: 0;
  61. }
  62. .js .dropbutton li + li {
  63. margin-top: 0;
  64. }
  65. @media screen and (min-width: 37.5625em) { /* 601px */
  66. .dropbutton li {
  67. display: inline-block;
  68. }
  69. .dropbutton li + li {
  70. margin-left: 1em;
  71. margin-top: 0;
  72. }
  73. .js .dropbutton li + li {
  74. margin-left: 0;
  75. }
  76. }
  77. /**
  78. * Copied styling for .button.
  79. */
  80. .js .dropbutton-multiple .dropbutton-widget {
  81. border: 1px solid #a6a6a6;
  82. border-radius: 20em;
  83. background-color: #f2f1eb;
  84. background-image: -webkit-linear-gradient(top, #f6f6f3, #e7e7df);
  85. background-image: linear-gradient(to bottom, #f6f6f3, #e7e7df);
  86. text-shadow: 0 1px hsla(0, 0%, 100%, 0.6);
  87. }
  88. .dropbutton-multiple.open .dropbutton-widget {
  89. border-radius: 1em;
  90. }
  91. .js .dropbutton-widget .dropbutton-action a,
  92. .js .dropbutton-widget .dropbutton-action input,
  93. .js .dropbutton-widget .dropbutton-action button {
  94. border-radius: 20em 0 0 20em; /* LTR */
  95. padding: 4px 1.5em;
  96. display: block;
  97. width: 100%;
  98. }
  99. [dir="rtl"].js .dropbutton-widget .dropbutton-action a,
  100. [dir="rtl"].js .dropbutton-widget .dropbutton-action input,
  101. [dir="rtl"].js .dropbutton-widget .dropbutton-action button {
  102. border-radius: 0 20em 20em 0;
  103. }
  104. .js .dropbutton-widget .dropbutton-action a:focus,
  105. .js .dropbutton-widget .dropbutton-action input:focus,
  106. .js .dropbutton-widget .dropbutton-action button:focus {
  107. text-decoration: underline;
  108. }
  109. .js .dropbutton-multiple.open .dropbutton-action a,
  110. .js .dropbutton-multiple.open .dropbutton-action .button {
  111. border-radius: 0;
  112. }
  113. .js .dropbutton-multiple.open .dropbutton-action:first-child a,
  114. .js .dropbutton-multiple.open .dropbutton-action:first-child .button {
  115. border-radius: 0.9em 0 0 0; /* LTR */
  116. }
  117. [dir="rtl"].js .dropbutton-multiple.open .dropbutton-action:first-child a,
  118. [dir="rtl"].js .dropbutton-multiple.open .dropbutton-action:first-child .button {
  119. border-radius: 0 0.9em 0 0;
  120. }
  121. .js .dropbutton-multiple.open .dropbutton-action:last-child a,
  122. .js .dropbutton-multiple.open .dropbutton-action:last-child .button {
  123. border-radius: 0 0 0 0.9em; /* LTR */
  124. }
  125. [dir="rtl"].js .dropbutton-multiple.open .dropbutton-action:last-child a,
  126. [dir="rtl"].js .dropbutton-multiple.open .dropbutton-action:last-child .button {
  127. border-radius: 0 0 0.9em 0;
  128. }
  129. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action a:hover,
  130. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action button:hover,
  131. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action input:hover,
  132. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action a:focus,
  133. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action button:focus,
  134. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action input:focus {
  135. background-color: #f9f8f6;
  136. background-image: -webkit-linear-gradient(top, #fcfcfa, #e9e9dd);
  137. background-image: linear-gradient(to bottom, #fcfcfa, #e9e9dd);
  138. color: #1a1a1a;
  139. box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.125);
  140. z-index: 3;
  141. }
  142. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action a:active,
  143. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action input:active,
  144. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action button:active {
  145. text-decoration: none;
  146. background-color: #dfdfd9;
  147. background-image: -webkit-linear-gradient(top, #f6f6f3, #e7e7df);
  148. background-image: linear-gradient(to bottom, #f6f6f3, #e7e7df);
  149. box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.2);
  150. }
  151. .dropbutton .secondary-action {
  152. border-top: 1px solid #bfbfba;
  153. }
  154. /**
  155. * Rare instances when a dropbutton is actually just a button.
  156. * Copied from Seven's buttons.css.
  157. */
  158. .dropbutton-single .dropbutton-widget {
  159. border: 0;
  160. position: static;
  161. display: inline-block;
  162. }
  163. .dropbutton-single .dropbutton-action a {
  164. padding: 4px 1.5em;
  165. border: 1px solid #a6a6a6;
  166. border-radius: 20em !important;
  167. background-color: #f2f1eb;
  168. background-image: -webkit-linear-gradient(top, #f6f6f3, #e7e7df);
  169. background-image: linear-gradient(to bottom, #f6f6f3, #e7e7df);
  170. color: #333;
  171. text-decoration: none;
  172. text-shadow: 0 1px hsla(0, 0%, 100%, 0.6);
  173. font-weight: 600;
  174. -webkit-transition: all 0.1s;
  175. transition: all 0.1s;
  176. -webkit-font-smoothing: antialiased;
  177. width: auto !important;
  178. }
  179. .dropbutton-single .dropbutton-action a:hover,
  180. .dropbutton-single .dropbutton-action a:focus {
  181. background-color: #f9f8f6;
  182. background-image: -webkit-linear-gradient(top, #fcfcfa, #e9e9dd);
  183. background-image: linear-gradient(to bottom, #fcfcfa, #e9e9dd);
  184. color: #1a1a1a;
  185. text-decoration: none;
  186. outline: none;
  187. }
  188. .dropbutton-single .dropbutton-action a:hover,
  189. .dropbutton-single .dropbutton-action a:focus {
  190. box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.125);
  191. }
  192. .dropbutton-single .dropbutton-action a:active {
  193. background-color: #dfdfd9;
  194. background-image: -webkit-linear-gradient(top, #f6f6f3, #e7e7df);
  195. background-image: linear-gradient(to bottom, #f6f6f3, #e7e7df);
  196. box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.2);
  197. -webkit-transition: none;
  198. transition: none;
  199. }
  200. .dropbutton .dropbutton-action .ajax-progress {
  201. position: absolute;
  202. z-index: 2;
  203. top: 0.2em;
  204. right: 0.2em;
  205. padding: 0 0 0 0.1em;
  206. }
  207. .dropbutton-multiple .dropbutton-action .ajax-progress {
  208. right: 2.2em;
  209. top: 0.15em;
  210. margin-right: 0;
  211. }
  212. .dropbutton-multiple .secondary-action .ajax-progress {
  213. top: auto;
  214. bottom: 0.3em;
  215. }
  216. /**
  217. * The dropdown trigger.
  218. */
  219. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  220. border-left: 1px solid #a6a6a6; /* LTR */
  221. outline: none;
  222. }
  223. [dir="rtl"].js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  224. border-right: 1px solid #a6a6a6;
  225. border-left: 0;
  226. }
  227. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  228. border-radius: 0 20em 20em 0; /* LTR */
  229. }
  230. [dir="rtl"].js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  231. border-radius: 20em 0 0 20em;
  232. }
  233. .dropbutton-multiple.open .dropbutton-widget .dropbutton-toggle button {
  234. border-radius: 0 1em 1em 0; /* LTR */
  235. }
  236. [dir="rtl"] .dropbutton-multiple.open .dropbutton-widget .dropbutton-toggle button {
  237. border-radius: 1em 0 0 1em;
  238. }
  239. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:hover,
  240. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:focus {
  241. background-color: #f9f8f6;
  242. background-image: -webkit-linear-gradient(top, #fcfcfa, #e9e9dd);
  243. background-image: linear-gradient(to bottom, #fcfcfa, #e9e9dd);
  244. color: #1a1a1a;
  245. text-decoration: none;
  246. box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.125);
  247. z-index: 3;
  248. }
  249. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:active {
  250. background-color: #dfdfd9;
  251. background-image: -webkit-linear-gradient(top, #f6f6f3, #e7e7df);
  252. background-image: linear-gradient(to bottom, #f6f6f3, #e7e7df);
  253. box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.2);
  254. }
  255. .dropbutton-arrow {
  256. border-top-color: #333;
  257. right: 35%; /* LTR */
  258. top: 54%;
  259. }
  260. [dir="rtl"] .dropbutton-arrow {
  261. left: 35%;
  262. right: auto;
  263. }
  264. .dropbutton-multiple.open .dropbutton-arrow {
  265. border-bottom: 0.3333em solid #333;
  266. border-top-color: transparent;
  267. top: 0.6667em;
  268. }
  269. /**
  270. * Form edit action theming.
  271. * Copied styling from .button--primary.
  272. */
  273. .js .form-actions .dropbutton .dropbutton-action > * {
  274. color: #fff;
  275. font-weight: 700;
  276. text-shadow: 0 1px hsla(0, 0%, 0%, 0.5);
  277. }
  278. .js .form-actions .dropbutton-widget {
  279. border-color: #1e5c90;
  280. background-color: #0071b8;
  281. background-image: -webkit-linear-gradient(top, #007bc6, #0071b8);
  282. background-image: linear-gradient(to bottom, #007bc6, #0071b8);
  283. text-shadow: 0 1px hsla(0, 0%, 0%, 0.5);
  284. position: relative;
  285. }
  286. .form-actions .dropbutton-multiple.open .dropbutton-widget {
  287. background-image: -webkit-linear-gradient(top, #007bc6, #0071b8);
  288. background-image: linear-gradient(to bottom, #007bc6, #0071b8);
  289. }
  290. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-action .button:hover,
  291. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-action .button:focus {
  292. background-color: #2369a6;
  293. background-image: -webkit-linear-gradient(top, #0c97ed, #1f86c7);
  294. background-image: linear-gradient(to bottom, #0c97ed, #1f86c7);
  295. box-shadow: 0 1px 2px hsla(203, 10%, 10%, 0.25);
  296. color: #fff;
  297. }
  298. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-action .button:active {
  299. background-image: -webkit-linear-gradient(top, #08639b, #0071b8);
  300. background-image: linear-gradient(to bottom, #08639b, #0071b8);
  301. border-color: #144b78;
  302. box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.2);
  303. }
  304. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button,
  305. .form-actions .dropbutton .secondary-action {
  306. border-color: #1e5c90;
  307. }
  308. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  309. background-image: -webkit-linear-gradient(top, #007bc6, #0071b8);
  310. background-image: linear-gradient(to bottom, #007bc6, #0071b8);
  311. }
  312. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:hover,
  313. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:focus {
  314. background-color: #2369a6;
  315. background-image: -webkit-linear-gradient(top, #0c97ed, #1f86c7);
  316. background-image: linear-gradient(to bottom, #0c97ed, #1f86c7);
  317. }
  318. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:active {
  319. background-image: -webkit-linear-gradient(top, #08639b, #0071b8);
  320. background-image: linear-gradient(to bottom, #08639b, #0071b8);
  321. border-color: #144b78;
  322. box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.2);
  323. }
  324. .form-actions .dropbutton-arrow {
  325. border-top-color: #fff;
  326. }
  327. .form-actions .dropbutton-multiple.open .dropbutton-arrow {
  328. border-bottom: 0.3333em solid white;
  329. }