buttons.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /**
  2. * @file
  3. *
  4. * Apply these classes to any element (<link>, <button>, <input>, etc.) that
  5. * should appear as a button.
  6. */
  7. /* nav action links */
  8. nav.action-links {
  9. display: flex;
  10. }
  11. nav.action-links li {
  12. margin-right: 20px;
  13. }
  14. nav.action-links li .button--small {
  15. padding: 13px 24px;
  16. }
  17. /* action links */
  18. .action-links {
  19. margin: 0 0 20px 0;
  20. padding: 0;
  21. list-style: none;
  22. }
  23. .action-links li {
  24. margin: 0;
  25. padding: 0;
  26. list-style: none;
  27. }
  28. .button,
  29. .views-remove-link,
  30. .views-remove-group-link {
  31. box-sizing: border-box;
  32. display: inline-block;
  33. position: relative;
  34. text-align: center;
  35. text-transform: uppercase;
  36. cursor: pointer;
  37. appearance: none;
  38. -webkit-appearance: none;
  39. -moz-appearance: none;
  40. padding: 13px 24px;
  41. background-color: #f5f5f5;
  42. color: #333;
  43. text-decoration: none;
  44. font-weight: 700;
  45. font-size: 12px;
  46. line-height: 1;
  47. -webkit-transition: all 0.2s;
  48. transition: all 0.2s;
  49. -webkit-font-smoothing: antialiased;
  50. border: 1px solid #b8b8b8;
  51. margin-left: 0;
  52. margin-top: 20px;
  53. min-width: 100px;
  54. width: 100%;
  55. height: auto;
  56. border-radius: 0;
  57. }
  58. .button:first-child {
  59. margin-left: 0;
  60. margin-top: 0;
  61. }
  62. .button:hover,
  63. .button:focus,
  64. .views-remove-link:hover,
  65. .views-remove-link:focus,
  66. .views-remove-group-link:hover,
  67. .views-remove-group-link:focus {
  68. background-color: white;
  69. border-color: #0678be;
  70. color: #0678be;
  71. text-decoration: none;
  72. outline: transparent;
  73. }
  74. /* small */
  75. .button--small,
  76. .views-remove-link,
  77. .views-remove-group-link {
  78. font-size: 12px;
  79. padding: 6px 10px;
  80. }
  81. @media screen and (min-width: 640px) {
  82. .button,
  83. .views-remove-link,
  84. .views-remove-group-link {
  85. width: auto;
  86. margin-left: 20px;
  87. margin-top: 0;
  88. }
  89. .button {
  90. margin-left: 0;
  91. margin-right: 20px;
  92. }
  93. .button:last-child,
  94. table .button:last-of-type {
  95. margin-right: 0;
  96. }
  97. }
  98. /* Prevent focus ring being covered by next siblings. */
  99. .button:focus {
  100. z-index: 10;
  101. }
  102. .button:active {
  103. background-color: #dfdfd9;
  104. -webkit-transition: none;
  105. transition: none;
  106. }
  107. .button--primary {
  108. padding: 13px 24px;
  109. background-color: #7cbc48;
  110. border-color: #7cbc48;
  111. color: #fff;
  112. font-weight: 700;
  113. -webkit-font-smoothing: antialiased;
  114. }
  115. .button--primary:hover,
  116. .button--primary:focus {
  117. background-color: #6aab35;
  118. border-color: #6aab35;
  119. color: #fff;
  120. }
  121. /**
  122. * Overrides styling from system.theme.
  123. */
  124. .button-action:before {
  125. margin-left: -0.2em; /* LTR */
  126. padding-right: 0.2em; /* LTR */
  127. font-size: 14px;
  128. font-size: 0.875rem;
  129. line-height: 16px;
  130. -webkit-font-smoothing: auto;
  131. }
  132. [dir="rtl"] .button-action:before {
  133. margin-right: -0.2em;
  134. margin-left: 0;
  135. padding-right: 0;
  136. padding-left: 0.2em;
  137. }
  138. .button:disabled,
  139. .button:disabled:active,
  140. .button.is-disabled,
  141. .button.is-disabled:active {
  142. border-color: #d4d4d4;
  143. background: #ededed;
  144. color: #5c5c5c;
  145. cursor: default;
  146. }
  147. /* Link actions.
  148. * Style a clickable/tappable element as a link. Duplicates the base style for
  149. * the <a> tag, plus a reset for padding, borders and background.
  150. */
  151. .link {
  152. display: inline;
  153. cursor: pointer;
  154. padding: 0 2px;
  155. border: 0;
  156. background: none;
  157. appearance: none;
  158. -webkit-appearance: none;
  159. -moz-appearance: none;
  160. color: #0678be;
  161. text-decoration: none;
  162. font-weight: 700;
  163. text-transform: uppercase;
  164. }
  165. .link:hover,
  166. .link:focus {
  167. text-decoration: none;
  168. outline: transparent;
  169. }
  170. .link:hover {
  171. color: #999;
  172. }
  173. /**
  174. * We've temporarily added the danger button here, bit of a harsh reset but we
  175. * need it.
  176. * @todo replace with link--danger.
  177. * See https://www.drupal.org/node/2123731
  178. */
  179. .button--danger {
  180. cursor: pointer;
  181. appearance: none;
  182. -webkit-appearance: none;
  183. -moz-appearance: none;
  184. }
  185. .button--danger:hover,
  186. .button--danger:focus,
  187. .button--danger:active {
  188. color: #c72100;
  189. border-color: #c72100;
  190. background: none;
  191. }
  192. .button--danger:disabled,
  193. .button--danger.is-disabled {
  194. color: #737373;
  195. cursor: default;
  196. text-decoration: none;
  197. -webkit-font-smoothing: antialiased;
  198. box-shadow: none;
  199. background: none;
  200. }