/wp-includes/css/buttons.css

https://bitbucket.org/skyarch-iijima/wordpress · CSS · 396 lines · 285 code · 52 blank · 59 comment · 0 complexity · aee0f4d3fa25115fde88df47238509ee MD5 · raw file

  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. border-radius: 3px;
  47. white-space: nowrap;
  48. box-sizing: border-box;
  49. }
  50. /* Remove the dotted border on :focus and the extra padding in Firefox */
  51. .wp-core-ui button::-moz-focus-inner,
  52. .wp-core-ui input[type="reset"]::-moz-focus-inner,
  53. .wp-core-ui input[type="button"]::-moz-focus-inner,
  54. .wp-core-ui input[type="submit"]::-moz-focus-inner {
  55. border-width: 0;
  56. border-style: none;
  57. padding: 0;
  58. }
  59. .wp-core-ui .button.button-large,
  60. .wp-core-ui .button-group.button-large .button {
  61. height: 30px;
  62. line-height: 28px;
  63. padding: 0 12px 2px;
  64. }
  65. .wp-core-ui .button.button-small,
  66. .wp-core-ui .button-group.button-small .button {
  67. height: 24px;
  68. line-height: 22px;
  69. padding: 0 8px 1px;
  70. font-size: 11px;
  71. }
  72. .wp-core-ui .button.button-hero,
  73. .wp-core-ui .button-group.button-hero .button {
  74. font-size: 14px;
  75. height: 46px;
  76. line-height: 44px;
  77. padding: 0 36px;
  78. }
  79. .wp-core-ui .button:active,
  80. .wp-core-ui .button:focus {
  81. outline: none;
  82. }
  83. .wp-core-ui .button.hidden {
  84. display: none;
  85. }
  86. /* Style Reset buttons as simple text links */
  87. .wp-core-ui input[type="reset"],
  88. .wp-core-ui input[type="reset"]:hover,
  89. .wp-core-ui input[type="reset"]:active,
  90. .wp-core-ui input[type="reset"]:focus {
  91. background: none;
  92. border: none;
  93. box-shadow: none;
  94. padding: 0 2px 1px;
  95. width: auto;
  96. }
  97. /* ----------------------------------------------------------------------------
  98. 2.0 - Default Button Style
  99. ---------------------------------------------------------------------------- */
  100. .wp-core-ui .button,
  101. .wp-core-ui .button-secondary {
  102. color: #555;
  103. border-color: #cccccc;
  104. background: #f7f7f7;
  105. box-shadow: 0 1px 0 #cccccc;
  106. vertical-align: top;
  107. }
  108. .wp-core-ui p .button {
  109. vertical-align: baseline;
  110. }
  111. .wp-core-ui .button.hover,
  112. .wp-core-ui .button:hover,
  113. .wp-core-ui .button-secondary:hover,
  114. .wp-core-ui .button.focus,
  115. .wp-core-ui .button:focus,
  116. .wp-core-ui .button-secondary:focus {
  117. background: #fafafa;
  118. border-color: #999;
  119. color: #23282d;
  120. }
  121. .wp-core-ui .button.focus,
  122. .wp-core-ui .button:focus,
  123. .wp-core-ui .button-secondary:focus {
  124. border-color: #5b9dd9;
  125. box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
  126. }
  127. .wp-core-ui .button.active,
  128. .wp-core-ui .button.active:hover,
  129. .wp-core-ui .button:active,
  130. .wp-core-ui .button-secondary:active {
  131. background: #eee;
  132. border-color: #999;
  133. box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
  134. -webkit-transform: translateY(1px);
  135. transform: translateY(1px);
  136. }
  137. .wp-core-ui .button.active:focus {
  138. border-color: #5b9dd9;
  139. box-shadow:
  140. inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ),
  141. 0 0 3px rgba( 0, 115, 170, .8 );
  142. }
  143. .wp-core-ui .button[disabled],
  144. .wp-core-ui .button:disabled,
  145. .wp-core-ui .button.disabled,
  146. .wp-core-ui .button-secondary[disabled],
  147. .wp-core-ui .button-secondary:disabled,
  148. .wp-core-ui .button-secondary.disabled,
  149. .wp-core-ui .button-disabled {
  150. color: #a0a5aa !important;
  151. border-color: #ddd !important;
  152. background: #f7f7f7 !important;
  153. box-shadow: none !important;
  154. text-shadow: 0 1px 0 #fff !important;
  155. cursor: default;
  156. -webkit-transform: none !important;
  157. transform: none !important;
  158. }
  159. /* Buttons that look like links, for a cross of good semantics with the visual */
  160. .wp-core-ui .button-link {
  161. margin: 0;
  162. padding: 0;
  163. box-shadow: none;
  164. border: 0;
  165. border-radius: 0;
  166. background: none;
  167. outline: none;
  168. cursor: pointer;
  169. text-align: left;
  170. /* Mimics the default link style in common.css */
  171. color: #0073aa;
  172. text-decoration: underline;
  173. transition-property: border, background, color;
  174. transition-duration: .05s;
  175. transition-timing-function: ease-in-out;
  176. }
  177. .wp-core-ui .button-link:hover,
  178. .wp-core-ui .button-link:active {
  179. color: #00a0d2;
  180. }
  181. .wp-core-ui .button-link:focus {
  182. color: #124964;
  183. box-shadow:
  184. 0 0 0 1px #5b9dd9,
  185. 0 0 2px 1px rgba(30, 140, 190, .8);
  186. }
  187. .wp-core-ui .button-link-delete {
  188. color: #a00;
  189. }
  190. .wp-core-ui .button-link-delete:hover,
  191. .wp-core-ui .button-link-delete:focus {
  192. color: #dc3232;
  193. }
  194. .ie8 .wp-core-ui .button-link:focus {
  195. outline: #5b9dd9 solid 1px;
  196. }
  197. /* ----------------------------------------------------------------------------
  198. 3.0 - Primary Button Style
  199. ---------------------------------------------------------------------------- */
  200. .wp-core-ui .button-primary {
  201. background: #0085ba;
  202. border-color: #0073aa #006799 #006799;
  203. box-shadow: 0 1px 0 #006799;
  204. color: #fff;
  205. text-decoration: none;
  206. text-shadow: 0 -1px 1px #006799,
  207. 1px 0 1px #006799,
  208. 0 1px 1px #006799,
  209. -1px 0 1px #006799;
  210. }
  211. .wp-core-ui .button-primary.hover,
  212. .wp-core-ui .button-primary:hover,
  213. .wp-core-ui .button-primary.focus,
  214. .wp-core-ui .button-primary:focus {
  215. background: #008ec2;
  216. border-color: #006799;
  217. color: #fff;
  218. }
  219. .wp-core-ui .button-primary.focus,
  220. .wp-core-ui .button-primary:focus {
  221. box-shadow: 0 1px 0 #0073aa,
  222. 0 0 2px 1px #33b3db;
  223. }
  224. .wp-core-ui .button-primary.active,
  225. .wp-core-ui .button-primary.active:hover,
  226. .wp-core-ui .button-primary.active:focus,
  227. .wp-core-ui .button-primary:active {
  228. background: #0073aa;
  229. border-color: #006799;
  230. box-shadow: inset 0 2px 0 #006799;
  231. vertical-align: top;
  232. }
  233. .wp-core-ui .button-primary[disabled],
  234. .wp-core-ui .button-primary:disabled,
  235. .wp-core-ui .button-primary-disabled,
  236. .wp-core-ui .button-primary.disabled {
  237. color: #66c6e4 !important;
  238. background: #008ec2 !important;
  239. border-color: #007cb2 !important;
  240. box-shadow: none !important;
  241. text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.1 ) !important;
  242. cursor: default;
  243. }
  244. .wp-core-ui .button.button-primary.button-hero {
  245. box-shadow: 0 2px 0 #006799;
  246. }
  247. .wp-core-ui .button.button-primary.button-hero.active,
  248. .wp-core-ui .button.button-primary.button-hero.active:hover,
  249. .wp-core-ui .button.button-primary.button-hero.active:focus,
  250. .wp-core-ui .button.button-primary.button-hero:active {
  251. box-shadow: inset 0 3px 0 #006799;
  252. }
  253. /* ----------------------------------------------------------------------------
  254. 4.0 - Button Groups
  255. ---------------------------------------------------------------------------- */
  256. .wp-core-ui .button-group {
  257. position: relative;
  258. display: inline-block;
  259. white-space: nowrap;
  260. font-size: 0;
  261. vertical-align: middle;
  262. }
  263. .wp-core-ui .button-group > .button {
  264. display: inline-block;
  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. border-radius: 3px 0 0 3px;
  277. }
  278. .wp-core-ui .button-group > .button:last-child {
  279. border-radius: 0 3px 3px 0;
  280. }
  281. .wp-core-ui .button-group > .button:focus {
  282. position: relative;
  283. z-index: 1;
  284. }
  285. /* ----------------------------------------------------------------------------
  286. 5.0 - Responsive Button Styles
  287. ---------------------------------------------------------------------------- */
  288. @media screen and ( max-width: 782px ) {
  289. .wp-core-ui .button,
  290. .wp-core-ui .button.button-large,
  291. .wp-core-ui .button.button-small,
  292. input#publish,
  293. input#save-post,
  294. a.preview {
  295. padding: 6px 14px;
  296. line-height: normal;
  297. font-size: 14px;
  298. vertical-align: middle;
  299. height: auto;
  300. margin-bottom: 4px;
  301. }
  302. #media-upload.wp-core-ui .button {
  303. padding: 0 10px 1px;
  304. height: 24px;
  305. line-height: 22px;
  306. font-size: 13px;
  307. }
  308. .media-frame.mode-grid .bulk-select .button {
  309. margin-bottom: 0;
  310. }
  311. /* Publish Metabox Options */
  312. .wp-core-ui .save-post-status.button {
  313. position: relative;
  314. margin: 0 14px 0 10px; /* 14px right margin to match all other buttons */
  315. }
  316. /* Reset responsive styles in Press This, Customizer */
  317. .wp-core-ui.wp-customizer .button {
  318. padding: 0 10px 1px;
  319. font-size: 13px;
  320. line-height: 26px;
  321. height: 28px;
  322. margin: 0;
  323. vertical-align: inherit;
  324. }
  325. .media-modal-content .media-toolbar-primary .media-button {
  326. margin-top: 10px;
  327. margin-left: 5px;
  328. }
  329. /* Reset responsive styles on Log in button on iframed login form */
  330. .interim-login .button.button-large {
  331. height: 30px;
  332. line-height: 28px;
  333. padding: 0 12px 2px;
  334. }
  335. }