dropbutton.component.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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: 12px;
  17. -webkit-font-smoothing: antialiased;
  18. text-align: left; /* LTR */
  19. font-size: 12px;
  20. text-transform: uppercase;
  21. }
  22. [dir="rtl"].js .dropbutton .dropbutton-action > input,
  23. [dir="rtl"].js .dropbutton .dropbutton-action > a,
  24. [dir="rtl"].js .dropbutton .dropbutton-action > button {
  25. text-align: right;
  26. margin-left: 0; /* This is required to win over specificity of [dir="rtl"] .dropbutton-multiple .dropbutton .dropbutton-action > * */
  27. }
  28. /**
  29. * Overwrite Mediterans button styling.
  30. */
  31. .js .dropbutton-widget .button {
  32. background: transparent;
  33. border: 0;
  34. border-radius: 0;
  35. box-shadow: none;
  36. }
  37. .js .dropbutton-multiple .dropbutton {
  38. border-right: 0; /* LTR */
  39. }
  40. [dir="rtl"].js .dropbutton-multiple .dropbutton {
  41. border-left: 0;
  42. }
  43. /**
  44. * Show dropbutton elements as buttons when javascript is disabled
  45. */
  46. .dropbutton {
  47. margin: 0;
  48. padding: 0;
  49. list-style-type: none;
  50. }
  51. .dropbutton li + li {
  52. margin-top: 10px;
  53. }
  54. .js .dropbutton li {
  55. margin-bottom: 0;
  56. margin-right: 0;
  57. }
  58. .js .dropbutton li + li {
  59. margin-top: 0;
  60. }
  61. @media screen and (min-width: 37.5625em) { /* 601px */
  62. .dropbutton li {
  63. display: inline-block;
  64. }
  65. .dropbutton li + li {
  66. margin-left: 1em;
  67. margin-top: 0;
  68. }
  69. .js .dropbutton li + li {
  70. margin-left: 0;
  71. }
  72. }
  73. /**
  74. * Copied styling for .button.
  75. */
  76. .js .dropbutton-multiple .dropbutton-widget {
  77. border: 1px solid #a6a6a6;
  78. background-color: #f9f9f9;
  79. }
  80. .js .dropbutton-widget .dropbutton-action a,
  81. .js .dropbutton-widget .dropbutton-action input,
  82. .js .dropbutton-widget .dropbutton-action button {
  83. padding: 7px 20px;
  84. display: block;
  85. width: 100%;
  86. box-sizing: border-box;
  87. }
  88. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action a:hover,
  89. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action button:hover,
  90. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action input:hover,
  91. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action a:focus,
  92. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action button:focus,
  93. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action input:focus {
  94. background-color: white;
  95. z-index: 3;
  96. }
  97. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action a:active,
  98. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action input:active,
  99. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-action button:active {
  100. text-decoration: none;
  101. background-color: white;
  102. }
  103. .dropbutton .secondary-action {
  104. border-top: 1px solid #bfbfba;
  105. }
  106. /**
  107. * Rare instances when a dropbutton is actually just a button.
  108. */
  109. .dropbutton-single .dropbutton-widget,
  110. .js td .dropbutton-single .dropbutton-widget {
  111. border: 0;
  112. position: static;
  113. display: inline-block;
  114. }
  115. .js td .dropbutton-single {
  116. display: inline-block;
  117. }
  118. .dropbutton-single .dropbutton-action a {
  119. padding: 4px 1.5em;
  120. border: 1px solid #a6a6a6;
  121. background-color: #f5f5f5;
  122. color: #333;
  123. text-decoration: none;
  124. font-weight: 600;
  125. -webkit-transition: all 0.1s;
  126. transition: all 0.1s;
  127. -webkit-font-smoothing: antialiased;
  128. width: auto;
  129. }
  130. .dropbutton-single .dropbutton-action a:hover,
  131. .dropbutton-single .dropbutton-action a:focus {
  132. background-color: white;
  133. color: #1a1a1a;
  134. text-decoration: none;
  135. outline: transparent;
  136. }
  137. .dropbutton-single .dropbutton-action a:active {
  138. background-color: white;
  139. -webkit-transition: none;
  140. transition: none;
  141. }
  142. .dropbutton .dropbutton-action .ajax-progress {
  143. position: absolute;
  144. z-index: 2;
  145. top: 0;
  146. right: -34px;
  147. justify-content: flex-end;
  148. }
  149. .dropbutton .dropbutton-action .ajax-progress-throbber .throbber {
  150. width: 15px;
  151. height: 15px;
  152. border-top: 3px solid rgba(0,128,255, 0.3);
  153. border-right: 3px solid rgba(0,128,255, 0.3);
  154. border-bottom: 3px solid rgba(0,128,255, 0.3);
  155. border-left: 3px solid #0678be;
  156. }
  157. .dropbutton-multiple .dropbutton-action .ajax-progress {
  158. margin-right: 0;
  159. }
  160. .dropbutton-multiple .secondary-action .ajax-progress {
  161. bottom: 0;
  162. }
  163. /**
  164. * The dropdown trigger.
  165. */
  166. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  167. border-left: 1px solid #a6a6a6; /* LTR */
  168. }
  169. [dir="rtl"].js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  170. border-right: 1px solid #a6a6a6;
  171. border-left: 0;
  172. }
  173. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:hover,
  174. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:focus {
  175. background-color: white;
  176. color: #1a1a1a;
  177. text-decoration: none;
  178. z-index: 3;
  179. outline: transparent;
  180. }
  181. .js .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:active {
  182. background-color: #f5f5f5;
  183. }
  184. .dropbutton-arrow {
  185. border-top-color: #333;
  186. right: 35%; /* LTR */
  187. top: 54%;
  188. }
  189. [dir="rtl"] .dropbutton-arrow {
  190. left: 35%;
  191. right: auto;
  192. }
  193. .dropbutton-multiple.open .dropbutton-arrow {
  194. border-bottom: 0.3333em solid #333;
  195. border-top-color: transparent;
  196. top: 0.6667em;
  197. }
  198. /**
  199. * Form edit action theming.
  200. * Copied styling from .button--primary.
  201. */
  202. .js .form-actions .dropbutton .dropbutton-action > * {
  203. color: #fff;
  204. font-weight: 700;
  205. }
  206. .js .form-actions .dropbutton-widget {
  207. border-color: #1e5c90;
  208. background-color: #0071b8;
  209. position: relative;
  210. }
  211. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-action .button:hover,
  212. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-action .button:focus {
  213. background-color: #2369a6;
  214. color: #fff;
  215. }
  216. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-action .button:active {
  217. border-color: #144b78;
  218. }
  219. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button,
  220. .form-actions .dropbutton .secondary-action {
  221. border-color: #1e5c90;
  222. }
  223. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:hover,
  224. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:focus {
  225. background-color: #2369a6;
  226. }
  227. .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button:active {
  228. border-color: #144b78;
  229. }
  230. .form-actions .dropbutton-arrow {
  231. border-top-color: #fff;
  232. }
  233. .form-actions .dropbutton-multiple.open .dropbutton-arrow {
  234. border-bottom: 0.3333em solid white;
  235. }