<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[22239] trunk: Revise and combine button selectors.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/22239">22239</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2012-10-15 21:25:25 +0000 (Mon, 15 Oct 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Revise and combine button selectors.
* Simplifies button selectors. Maintains backwards compatibility for several classes and makes creating new button styles considerably easier.
* Adds buttons documentation.
* Raw input submit/reset/button types now use default browser styles (instead of half-styled borders that did not look like buttons).
* Moves basic button color standardization to the beginning of wp-admin.
see <a href="http://core.trac.wordpress.org/ticket/21598">#21598</a>, <a href="http://core.trac.wordpress.org/ticket/22197">#22197</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincsscolorsclassiccss">trunk/wp-admin/css/colors-classic.css</a></li>
<li><a href="#trunkwpadmincsscolorsfreshcss">trunk/wp-admin/css/colors-fresh.css</a></li>
<li><a href="#trunkwpadmincsswpadmincss">trunk/wp-admin/css/wp-admin.css</a></li>
<li><a href="#trunkwpincludescssbuttonscss">trunk/wp-includes/css/buttons.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsscolorsclassiccss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-classic.css (22238 => 22239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-classic.css        2012-10-15 20:42:57 UTC (rev 22238)
+++ trunk/wp-admin/css/colors-classic.css        2012-10-15 21:25:25 UTC (rev 22239)
</span><span class="lines">@@ -20,66 +20,6 @@
</span><span class="cx"> 1.0 - Left to Right Styles
</span><span class="cx"> ------------------------------------------------------------------------------*/
</span><span class="cx">
</span><del>-html,
-.wp-dialog {
-        background-color: #fff;
-}
-
-* html input,
-* html .widget {
-        border-color: #dfdfdf;
-}
-
-textarea,
-input[type="text"],
-input[type="password"],
-input[type="file"],
-input[type="button"],
-input[type="submit"],
-input[type="reset"],
-input[type="email"],
-input[type="number"],
-input[type="search"],
-input[type="tel"],
-input[type="url"],
-select {
-        border-color: #dfdfdf;
-        background-color: #fff;
-        color: #333;
-}
-
-select {
-        color: #000;
-}
-
-textarea:focus,
-input[type="text"]:focus,
-input[type="password"]:focus,
-input[type="file"]:focus,
-input[type="button"]:focus,
-input[type="submit"].focus,
-input[type="submit"]:focus,
-input[type="reset"]:focus,
-input[type="email"]:focus,
-input[type="number"]:focus,
-input[type="search"]:focus,
-input[type="tel"]:focus,
-input[type="url"]:focus,
-select:focus {
-        border-color: #a1a1a1;
-        -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
-        box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
-}
-
-kbd,
-code {
-        background: #eaeaea;
-}
-
-input[readonly] {
-        background-color: #eee;
-}
-
</del><span class="cx"> .find-box-search {
</span><span class="cx">         border-color: #dfdfdf;
</span><span class="cx">         background-color: #f1f1f1;
</span></span></pre></div>
<a id="trunkwpadmincsscolorsfreshcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-fresh.css (22238 => 22239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-fresh.css        2012-10-15 20:42:57 UTC (rev 22238)
+++ trunk/wp-admin/css/colors-fresh.css        2012-10-15 21:25:25 UTC (rev 22239)
</span><span class="lines">@@ -20,61 +20,6 @@
</span><span class="cx"> 1.0 - Left to Right Styles
</span><span class="cx"> ------------------------------------------------------------------------------*/
</span><span class="cx">
</span><del>-html,
-.wp-dialog {
-        background-color: #fff;
-}
-
-textarea,
-input[type="text"],
-input[type="password"],
-input[type="file"],
-input[type="button"],
-input[type="submit"],
-input[type="reset"],
-input[type="email"],
-input[type="number"],
-input[type="search"],
-input[type="tel"],
-input[type="url"],
-select {
-        border-color: #dfdfdf;
-        background-color: #fff;
-        color: #333;
-}
-
-select {
-        color: #000;
-}
-
-textarea:focus,
-input[type="text"]:focus,
-input[type="password"]:focus,
-input[type="file"]:focus,
-input[type="button"]:focus,
-input[type="submit"].focus,
-input[type="submit"]:focus,
-input[type="reset"]:focus,
-input[type="email"]:focus,
-input[type="number"]:focus,
-input[type="search"]:focus,
-input[type="tel"]:focus,
-input[type="url"]:focus,
-select:focus {
-        border-color: #a1a1a1;
-        -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
-        box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
-}
-
-kbd,
-code {
-        background: #eaeaea;
-}
-
-input[readonly] {
-        background-color: #eee;
-}
-
</del><span class="cx"> .find-box-search {
</span><span class="cx">         border-color: #dfdfdf;
</span><span class="cx">         background-color: #f1f1f1;
</span></span></pre></div>
<a id="trunkwpadmincsswpadmincss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.css (22238 => 22239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.css        2012-10-15 20:42:57 UTC (rev 22238)
+++ trunk/wp-admin/css/wp-admin.css        2012-10-15 21:25:25 UTC (rev 22239)
</span><span class="lines">@@ -471,9 +471,6 @@
</span><span class="cx"> input[type="text"],
</span><span class="cx"> input[type="password"],
</span><span class="cx"> input[type="file"],
</span><del>-input[type="button"],
-input[type="submit"],
-input[type="reset"],
</del><span class="cx"> input[type="email"],
</span><span class="cx"> input[type="number"],
</span><span class="cx"> input[type="search"],
</span><span class="lines">@@ -663,7 +660,54 @@
</span><span class="cx">         padding-right: 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+html,
+.wp-dialog {
+        background-color: #fff;
+}
</ins><span class="cx">
</span><ins>+textarea,
+input[type="text"],
+input[type="password"],
+input[type="file"],
+input[type="email"],
+input[type="number"],
+input[type="search"],
+input[type="tel"],
+input[type="url"],
+select {
+        border-color: #dfdfdf;
+        background-color: #fff;
+        color: #333;
+}
+
+select {
+        color: #000;
+}
+
+textarea:focus,
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="file"]:focus,
+input[type="email"]:focus,
+input[type="number"]:focus,
+input[type="search"]:focus,
+input[type="tel"]:focus,
+input[type="url"]:focus,
+select:focus {
+        border-color: #a1a1a1;
+        -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
+        box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
+}
+
+kbd,
+code {
+        background: #eaeaea;
+}
+
+input[readonly] {
+        background-color: #eee;
+}
+
</ins><span class="cx"> /*------------------------------------------------------------------------------
</span><span class="cx"> 1.0 - Text Styles
</span><span class="cx"> ------------------------------------------------------------------------------*/
</span><span class="lines">@@ -2191,7 +2235,7 @@
</span><span class="cx">         background-position: 100% 17%;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.welcome-button {
</del><ins>+.welcome-panel .welcome-button {
</ins><span class="cx">         margin: -9px 0 3px;
</span><span class="cx">         padding: 1em 3em;
</span><span class="cx">         font: normal 15px/1 sans-serif;
</span></span></pre></div>
<a id="trunkwpincludescssbuttonscss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/buttons.css (22238 => 22239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/buttons.css        2012-10-15 20:42:57 UTC (rev 22238)
+++ trunk/wp-includes/css/buttons.css        2012-10-15 21:25:25 UTC (rev 22239)
</span><span class="lines">@@ -2,8 +2,25 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> WordPress-style Buttons
</span><ins>+=======================
+Create a button by adding the `.button` class to an element. For backwards
+compatibility, we support several other classes (such as `.button-secondary`),
+but these will *not* work with the stackable classes described below.
</ins><span class="cx">
</span><ins>+Button Styles
+-------------
+To display a primary button style, add the `.button-primary` class to a button.
</ins><span class="cx">
</span><ins>+Button Sizes
+------------
+Adjust a button's size by adding the `.button-large` or `.button-small` class.
+
+Button States
+-------------
+Lock the state of a button by adding the name of the pseudoclass as
+an actual class (e.g. `.hover` for `:hover`).
+
+
</ins><span class="cx"> TABLE OF CONTENTS:
</span><span class="cx"> ------------------
</span><span class="cx"> 1.0 - Button Layouts
</span><span class="lines">@@ -16,13 +33,9 @@
</span><span class="cx"> 1.0 - Button Layouts
</span><span class="cx"> ---------------------------------------------------------------------------- */
</span><span class="cx">
</span><del>-.submit input,
</del><span class="cx"> .button,
</span><del>-input.button,
</del><span class="cx"> .button-primary,
</span><del>-input.button-primary,
-.button-secondary,
-input.button-secondary {
</del><ins>+.button-secondary {
</ins><span class="cx">         display: inline-block;
</span><span class="cx">         text-decoration: none;
</span><span class="cx">         font-size: 12px;
</span><span class="lines">@@ -49,7 +62,7 @@
</span><span class="cx">         padding: 0.15em 0.75em 0.17em;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-a.button:active {
</del><ins>+.button:active {
</ins><span class="cx">         outline: none;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -58,10 +71,7 @@
</span><span class="cx"> ---------------------------------------------------------------------------- */
</span><span class="cx">
</span><span class="cx"> .button,
</span><del>-.button-secondary,
-.submit input,
-input[type=button],
-input[type=submit] {
</del><ins>+.button-secondary {
</ins><span class="cx">         background: #f3f3f3;
</span><span class="cx">         background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#f4f4f4));
</span><span class="cx">         background-image: -webkit-linear-gradient(top, #fefefe, #f4f4f4);
</span><span class="lines">@@ -75,24 +85,15 @@
</span><span class="cx">
</span><span class="cx"> .button.hover,
</span><span class="cx"> .button:hover,
</span><del>-.button-secondary.hover,
</del><span class="cx"> .button-secondary:hover,
</span><del>-.submit input:hover,
-input[type=button]:hover,
-input[type=submit]:hover,
</del><span class="cx"> .button.focus,
</span><span class="cx"> .button:focus,
</span><del>-.button-secondary.focus,
-.button-secondary:focus,
-.submit input.focus,
-.submit input:focus,
-input[type=button].focus,
-input[type=button]:focus,
-input[type=submit]:focus {
</del><ins>+.button-secondary:focus {
</ins><span class="cx">         background: #f3f3f3;
</span><span class="cx">         background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
</span><span class="cx">         background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
</span><span class="cx">         background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
</span><ins>+        background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
</ins><span class="cx">         background-image: -o-linear-gradient(top, #fff, #f3f3f3);
</span><span class="cx">         background-image: linear-gradient(to bottom, #fff, #f3f3f3);
</span><span class="cx">         border-color: #999;
</span><span class="lines">@@ -101,29 +102,21 @@
</span><span class="cx">
</span><span class="cx"> .button.focus,
</span><span class="cx"> .button:focus,
</span><del>-.button-secondary.focus,
-.button-secondary:focus,
-.submit input.focus,
-.submit input:focus,
-input[type=button].focus,
-input[type=button]:focus,
-input[type=submit]:focus {
</del><ins>+.button-secondary:focus {
</ins><span class="cx">         -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
</span><span class="cx">         box-shadow: 0 1px 2px rgba(0,0,0,0.1);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .button.active,
</span><ins>+.button.active:hover,
+.button.active:focus,
</ins><span class="cx"> .button:active,
</span><del>-.button-secondary.active,
-.button-secondary:active,
-.submit input:active,
-input[type=button].active,
-input[type=button]:active,
-input[type=submit]:active {
</del><ins>+.button-secondary:active {
</ins><span class="cx">         background: #eee;
</span><span class="cx">         background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#fefefe));
</span><span class="cx">         background-image: -webkit-linear-gradient(top, #f4f4f4, #fefefe);
</span><span class="cx">         background-image: -moz-linear-gradient(top, #f4f4f4, #fefefe);
</span><ins>+        background-image: -ms-linear-gradient(top, #f4f4f4, #fefefe);
</ins><span class="cx">         background-image: -o-linear-gradient(top, #f4f4f4, #fefefe);
</span><span class="cx">         background-image: linear-gradient(to bottom, #f4f4f4, #fefefe);
</span><span class="cx">         border-color: #999;
</span><span class="lines">@@ -133,17 +126,17 @@
</span><span class="cx">         box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.button-disabled,
</del><span class="cx"> .button[disabled],
</span><span class="cx"> .button:disabled,
</span><span class="cx"> .button-secondary[disabled],
</span><span class="cx"> .button-secondary:disabled,
</span><del>-a.button.disabled {
</del><ins>+.button-disabled {
</ins><span class="cx">         color: #aaa !important;
</span><span class="cx">         border-color: #ddd !important;
</span><span class="cx">         background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#f4f4f4)) !important;
</span><span class="cx">         background-image: -webkit-linear-gradient(top, #f9f9f9, #f4f4f4) !important;
</span><span class="cx">         background-image: -moz-linear-gradient(top, #f9f9f9, #f4f4f4) !important;
</span><ins>+        background-image: -ms-linear-gradient(top, #f9f9f9, #f4f4f4) !important;
</ins><span class="cx">         background-image: -o-linear-gradient(top, #f9f9f9, #f4f4f4) !important;
</span><span class="cx">         background-image: linear-gradient(to bottom, #f9f9f9, #f4f4f4) !important;
</span><span class="cx">         -webkit-box-shadow: none !important;
</span><span class="lines">@@ -155,15 +148,12 @@
</span><span class="cx"> 3.0 - Primary Button Style
</span><span class="cx"> ---------------------------------------------------------------------------- */
</span><span class="cx">
</span><del>-input.button-primary,
-input[type=submit].button-primary,
-input[type=button].button-primary,
-button.button-primary,
-a.button-primary {
</del><ins>+.button-primary {
</ins><span class="cx">         background-color: #21759b;
</span><span class="cx">         background-image: -webkit-gradient(linear, left top, left bottom, from(#2a95c5), to(#21759b));
</span><span class="cx">         background-image: -webkit-linear-gradient(top, #2a95c5, #21759b);
</span><span class="cx">         background-image: -moz-linear-gradient(top, #2a95c5, #21759b);
</span><ins>+        background-image: -ms-linear-gradient(top, #2a95c5, #21759b);
</ins><span class="cx">         background-image: -o-linear-gradient(top, #2a95c5, #21759b);
</span><span class="cx">         background-image: linear-gradient(to bottom, #2a95c5, #21759b);
</span><span class="cx">         border-color: #21759b;
</span><span class="lines">@@ -175,18 +165,10 @@
</span><span class="cx">         text-shadow: 0 1px 0 rgba(0,0,0,0.1);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-input.button-primary.hover,
-input.button-primary:hover,
-input[type=submit].button-primary:hover,
-input[type=button].button-primary:hover,
-button.button-primary:hover,
-a.button-primary:hover,
-input.button-primary.focus,
-input.button-primary:focus,
-input[type=submit].button-primary:focus,
-input[type=button].button-primary:focus,
-button.button-primary:focus,
-a.button-primary:focus {
</del><ins>+.button-primary.hover,
+.button-primary:hover,
+.button-primary.focus,
+.button-primary:focus {
</ins><span class="cx">         background-color: #278ab7;
</span><span class="cx">         background-image: -webkit-gradient(linear, left top, left bottom, from(#2e9fd2), to(#21759b));
</span><span class="cx">         background-image: -webkit-linear-gradient(top, #2e9fd2, #21759b);
</span><span class="lines">@@ -201,23 +183,17 @@
</span><span class="cx">         text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-input.button-primary.focus,
-input.button-primary:focus,
-input[type=submit].button-primary:focus,
-input[type=button].button-primary:focus,
-button.button-primary:focus,
-a.button-primary:focus {
</del><ins>+.button-primary.focus,
+.button-primary:focus {
</ins><span class="cx">         border-color: #0e3950;
</span><span class="cx">         -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 0 1px 2px rgba(0,0,0,0.1);
</span><span class="cx">         box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 0 1px 2px rgba(0,0,0,0.1);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-input.button-primary.active,
-input[type=submit].button-primary:active,
-input[type=button].button-primary:active,
-input.button-primary:active,
-button.button-primary:active,
-a.button-primary:active {
</del><ins>+.button-primary.active,
+.button-primary.active:hover,
+.button-primary.active:focus,
+.button-primary:active {
</ins><span class="cx">         background: #1b607f;
</span><span class="cx">         background-image: -webkit-gradient(linear, left top, left bottom, from(#21759b), to(#278ab7));
</span><span class="cx">         background-image: -webkit-linear-gradient(top, #21759b, #278ab7);
</span><span class="lines">@@ -232,9 +208,9 @@
</span><span class="cx">         text-shadow: 0 1px 0 rgba(0,0,0,0.1);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.button-primary-disabled,
</del><span class="cx"> .button-primary[disabled],
</span><del>-.button-primary:disabled {
</del><ins>+.button-primary:disabled,
+.button-primary-disabled {
</ins><span class="cx">         color: #94cde7 !important;
</span><span class="cx">         background: #298cba !important;
</span><span class="cx">         border-color: #1b607f !important;
</span><span class="lines">@@ -242,8 +218,3 @@
</span><span class="cx">         box-shadow: none !important;
</span><span class="cx">         text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important;
</span><span class="cx"> }
</span><del>-
-.button-primary-disabled:hover,
-.button-primary[disabled]:hover {
-        text-shadow: none;
-}
</del></span></pre>
</div>
</div>
</body>
</html>