You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

390 lines
9.5 KiB

  1. /* ----------------------------------------------------------------------------
  2. NOTE: If you edit this file, you should make sure that the CSS rules for
  3. buttons in the following files are updated.
  4. * jquery-ui-dialog.css
  5. * editor.css
  6. WordPress-style Buttons
  7. =======================
  8. Create a button by adding the `.button` class to an element. For backward
  9. compatibility, we support several other classes (such as `.button-secondary`),
  10. but these will *not* work with the stackable classes described below.
  11. Button Styles
  12. -------------
  13. To display a primary button style, add the `.button-primary` class to a button.
  14. Button Sizes
  15. ------------
  16. Adjust a button's size by adding the `.button-large` or `.button-small` class.
  17. Button States
  18. -------------
  19. Lock the state of a button by adding the name of the pseudoclass as
  20. an actual class (e.g. `.hover` for `:hover`).
  21. TABLE OF CONTENTS:
  22. ------------------
  23. 1.0 - Button Layouts
  24. 2.0 - Default Button Style
  25. 3.0 - Primary Button Style
  26. 4.0 - Button Groups
  27. 5.0 - Responsive Button Styles
  28. ---------------------------------------------------------------------------- */
  29. /* ----------------------------------------------------------------------------
  30. 1.0 - Button Layouts
  31. ---------------------------------------------------------------------------- */
  32. .wp-core-ui .button,
  33. .wp-core-ui .button-primary,
  34. .wp-core-ui .button-secondary {
  35. display: inline-block;
  36. text-decoration: none;
  37. font-size: 13px;
  38. line-height: 26px;
  39. height: 28px;
  40. margin: 0;
  41. padding: 0 10px 1px;
  42. cursor: pointer;
  43. border-width: 1px;
  44. border-style: solid;
  45. -webkit-appearance: none;
  46. -webkit-border-radius: 3px;
  47. border-radius: 3px;
  48. white-space: nowrap;
  49. -webkit-box-sizing: border-box;
  50. -moz-box-sizing: border-box;
  51. box-sizing: border-box;
  52. }
  53. /* Remove the dotted border on :focus and the extra padding in Firefox */
  54. .wp-core-ui button::-moz-focus-inner,
  55. .wp-core-ui input[type="reset"]::-moz-focus-inner,
  56. .wp-core-ui input[type="button"]::-moz-focus-inner,
  57. .wp-core-ui input[type="submit"]::-moz-focus-inner {
  58. border-width: 0;
  59. border-style: none;
  60. padding: 0;
  61. }
  62. .wp-core-ui .button.button-large,
  63. .wp-core-ui .button-group.button-large .button {
  64. height: 30px;
  65. line-height: 28px;
  66. padding: 0 12px 2px;
  67. }
  68. .wp-core-ui .button.button-small,
  69. .wp-core-ui .button-group.button-small .button {
  70. height: 24px;
  71. line-height: 22px;
  72. padding: 0 8px 1px;
  73. font-size: 11px;
  74. }
  75. .wp-core-ui .button.button-hero,
  76. .wp-core-ui .button-group.button-hero .button {
  77. font-size: 14px;
  78. height: 46px;
  79. line-height: 44px;
  80. padding: 0 36px;
  81. }
  82. .wp-core-ui .button:active,
  83. .wp-core-ui .button:focus {
  84. outline: none;
  85. }
  86. .wp-core-ui .button.hidden {
  87. display: none;
  88. }
  89. /* Style Reset buttons as simple text links */
  90. .wp-core-ui input[type="reset"],
  91. .wp-core-ui input[type="reset"]:hover,
  92. .wp-core-ui input[type="reset"]:active,
  93. .wp-core-ui input[type="reset"]:focus {
  94. background: none;
  95. border: none;
  96. -webkit-box-shadow: none;
  97. box-shadow: none;
  98. padding: 0 2px 1px;
  99. width: auto;
  100. }
  101. /* ----------------------------------------------------------------------------
  102. 2.0 - Default Button Style
  103. ---------------------------------------------------------------------------- */
  104. .wp-core-ui .button,
  105. .wp-core-ui .button-secondary {
  106. color: #555;
  107. border-color: #cccccc;
  108. background: #f7f7f7;
  109. -webkit-box-shadow: 0 1px 0 #cccccc;
  110. box-shadow: 0 1px 0 #cccccc;
  111. vertical-align: top;
  112. }
  113. .wp-core-ui p .button {
  114. vertical-align: baseline;
  115. }
  116. .wp-core-ui .button.hover,
  117. .wp-core-ui .button:hover,
  118. .wp-core-ui .button-secondary:hover,
  119. .wp-core-ui .button.focus,
  120. .wp-core-ui .button:focus,
  121. .wp-core-ui .button-secondary:focus {
  122. background: #fafafa;
  123. border-color: #999;
  124. color: #23282d;
  125. }
  126. .wp-core-ui .button.focus,
  127. .wp-core-ui .button:focus,
  128. .wp-core-ui .button-secondary:focus,
  129. .wp-core-ui .button-link:focus {
  130. border-color: #5b9dd9;
  131. -webkit-box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
  132. box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
  133. }
  134. .wp-core-ui .button.active,
  135. .wp-core-ui .button.active:hover,
  136. .wp-core-ui .button:active,
  137. .wp-core-ui .button-secondary:active {
  138. background: #eee;
  139. border-color: #999;
  140. -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
  141. box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
  142. -webkit-transform: translateY(1px);
  143. -ms-transform: translateY(1px);
  144. transform: translateY(1px);
  145. }
  146. .wp-core-ui .button.active:focus {
  147. border-color: #5b9dd9;
  148. -webkit-box-shadow:
  149. inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ),
  150. 0 0 3px rgba( 0, 115, 170, .8 );
  151. box-shadow:
  152. inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ),
  153. 0 0 3px rgba( 0, 115, 170, .8 );
  154. }
  155. .wp-core-ui .button[disabled],
  156. .wp-core-ui .button:disabled,
  157. .wp-core-ui .button.disabled,
  158. .wp-core-ui .button-secondary[disabled],
  159. .wp-core-ui .button-secondary:disabled,
  160. .wp-core-ui .button-secondary.disabled,
  161. .wp-core-ui .button-disabled {
  162. color: #a0a5aa !important;
  163. border-color: #ddd !important;
  164. background: #f7f7f7 !important;
  165. -webkit-box-shadow: none !important;
  166. box-shadow: none !important;
  167. text-shadow: 0 1px 0 #fff !important;
  168. cursor: default;
  169. -webkit-transform: none !important;
  170. -ms-transform: none !important;
  171. transform: none !important;
  172. }
  173. /* Buttons that look like links, for a cross of good semantics with the visual */
  174. .wp-core-ui .button-link {
  175. margin: 0;
  176. padding: 0;
  177. -webkit-box-shadow: none;
  178. box-shadow: none;
  179. border: 0;
  180. -webkit-border-radius: 0;
  181. border-radius: 0;
  182. background: none;
  183. outline: none;
  184. cursor: pointer;
  185. }
  186. .wp-core-ui .button-link:focus {
  187. outline: #5b9dd9 solid 1px;
  188. }
  189. /* ----------------------------------------------------------------------------
  190. 3.0 - Primary Button Style
  191. ---------------------------------------------------------------------------- */
  192. .wp-core-ui .button-primary {
  193. background: #0085ba;
  194. border-color: #0073aa #006799 #006799;
  195. -webkit-box-shadow: 0 1px 0 #006799;
  196. box-shadow: 0 1px 0 #006799;
  197. color: #fff;
  198. text-decoration: none;
  199. text-shadow: 0 -1px 1px #006799,
  200. 1px 0 1px #006799,
  201. 0 1px 1px #006799,
  202. -1px 0 1px #006799;
  203. }
  204. .wp-core-ui .button-primary.hover,
  205. .wp-core-ui .button-primary:hover,
  206. .wp-core-ui .button-primary.focus,
  207. .wp-core-ui .button-primary:focus {
  208. background: #008ec2;
  209. border-color: #006799;
  210. color: #fff;
  211. }
  212. .wp-core-ui .button-primary.focus,
  213. .wp-core-ui .button-primary:focus {
  214. -webkit-box-shadow: 0 1px 0 #0073aa,
  215. 0 0 2px 1px #33b3db;
  216. box-shadow: 0 1px 0 #0073aa,
  217. 0 0 2px 1px #33b3db;
  218. }
  219. .wp-core-ui .button-primary.active,
  220. .wp-core-ui .button-primary.active:hover,
  221. .wp-core-ui .button-primary.active:focus,
  222. .wp-core-ui .button-primary:active {
  223. background: #0073aa;
  224. border-color: #006799;
  225. -webkit-box-shadow: inset 0 2px 0 #006799;
  226. box-shadow: inset 0 2px 0 #006799;
  227. vertical-align: top;
  228. }
  229. .wp-core-ui .button-primary[disabled],
  230. .wp-core-ui .button-primary:disabled,
  231. .wp-core-ui .button-primary-disabled,
  232. .wp-core-ui .button-primary.disabled {
  233. color: #66c6e4 !important;
  234. background: #008ec2 !important;
  235. border-color: #007cb2 !important;
  236. -webkit-box-shadow: none !important;
  237. box-shadow: none !important;
  238. text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.1 ) !important;
  239. cursor: default;
  240. }
  241. .wp-core-ui .button.button-primary.button-hero {
  242. -webkit-box-shadow: 0 2px 0 #006799;
  243. box-shadow: 0 2px 0 #006799;
  244. }
  245. .wp-core-ui .button.button-primary.button-hero.active,
  246. .wp-core-ui .button.button-primary.button-hero.active:hover,
  247. .wp-core-ui .button.button-primary.button-hero.active:focus,
  248. .wp-core-ui .button.button-primary.button-hero:active {
  249. -webkit-box-shadow: inset 0 3px 0 #006799;
  250. box-shadow: inset 0 3px 0 #006799;
  251. }
  252. /* ----------------------------------------------------------------------------
  253. 4.0 - Button Groups
  254. ---------------------------------------------------------------------------- */
  255. .wp-core-ui .button-group {
  256. position: relative;
  257. display: inline-block;
  258. white-space: nowrap;
  259. font-size: 0;
  260. vertical-align: middle;
  261. }
  262. .wp-core-ui .button-group > .button {
  263. display: inline-block;
  264. -webkit-border-radius: 0;
  265. border-radius: 0;
  266. margin-right: -1px;
  267. z-index: 10;
  268. }
  269. .wp-core-ui .button-group > .button-primary {
  270. z-index: 100;
  271. }
  272. .wp-core-ui .button-group > .button:hover {
  273. z-index: 20;
  274. }
  275. .wp-core-ui .button-group > .button:first-child {
  276. -webkit-border-radius: 3px 0 0 3px;
  277. border-radius: 3px 0 0 3px;
  278. }
  279. .wp-core-ui .button-group > .button:last-child {
  280. -webkit-border-radius: 0 3px 3px 0;
  281. border-radius: 0 3px 3px 0;
  282. }
  283. .wp-core-ui .button-group > .button:focus {
  284. position: relative;
  285. z-index: 1;
  286. }
  287. /* ----------------------------------------------------------------------------
  288. 5.0 - Responsive Button Styles
  289. ---------------------------------------------------------------------------- */
  290. @media screen and ( max-width: 782px ) {
  291. .wp-core-ui .button,
  292. .wp-core-ui .button.button-large,
  293. .wp-core-ui .button.button-small,
  294. input#publish,
  295. input#save-post,
  296. a.preview {
  297. padding: 6px 14px;
  298. line-height: normal;
  299. font-size: 14px;
  300. vertical-align: middle;
  301. height: auto;
  302. margin-bottom: 4px;
  303. }
  304. #media-upload.wp-core-ui .button {
  305. padding: 0 10px 1px;
  306. height: 24px;
  307. line-height: 22px;
  308. font-size: 13px;
  309. }
  310. .media-frame.mode-grid .bulk-select .button {
  311. margin-bottom: 0;
  312. }
  313. /* Publish Metabox Options */
  314. .wp-core-ui .save-post-status.button {
  315. position: relative;
  316. margin: 0 14px 0 10px; /* 14px right margin to match all other buttons */
  317. }
  318. /* Reset responsive styles in Press This, Customizer */
  319. .wp-core-ui.wp-customizer .button {
  320. padding: 0 10px 1px;
  321. font-size: 13px;
  322. line-height: 26px;
  323. height: 28px;
  324. margin: 0;
  325. vertical-align: inherit;
  326. }
  327. /* Reset responsive styles on Log in button on iframed login form */
  328. .interim-login .button.button-large {
  329. height: 30px;
  330. line-height: 28px;
  331. padding: 0 12px 2px;
  332. }
  333. }