[Rt-commit] rt branch, 4.2/allow-other-elements-to-be-buttons, created. rt-4.2.10-196-ga0f1f67
Jesse Vincent
jesse at bestpractical.com
Sun Mar 15 20:39:29 EDT 2015
The branch, 4.2/allow-other-elements-to-be-buttons has been created
at a0f1f67dcd6e762a8fee065769e6822ac372301c (commit)
- Log -----------------------------------------------------------------
commit a0f1f67dcd6e762a8fee065769e6822ac372301c
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Mar 15 17:31:15 2015 -0700
Allow elements styled as .button to render the same as other buttons.
In some cases, developers want to be able to style ordinary hrefs or
other elements to look like buttons. Historically, RT hackers have
indicated button nature with text like [Button] inside an href.
This change allows developers to style buttons as buttons by giving
them a css class including "button"
diff --git a/share/static/css/base/forms.css b/share/static/css/base/forms.css
index e763778..50f5fd7 100644
--- a/share/static/css/base/forms.css
+++ b/share/static/css/base/forms.css
@@ -32,7 +32,7 @@ div.button-row {
}
-input[type=reset], input[type=submit], input[class=button], button {
+.button, .button:visited, input[type=reset], input[type=submit], input[class=button], button {
color: #fff;
background: #3858a3;
padding: 0.25em;
@@ -43,11 +43,11 @@ input[type=reset], input[type=submit], input[class=button], button {
border-radius: 0.5em;
}
-input.button:hover, button:hover, input[type=reset]:hover, input[type=submit]:hover, input[class=button]:hover {
+.button:hover, input.button:hover, button:hover, input[type=reset]:hover, input[type=submit]:hover, input[class=button]:hover {
background: #1D3B7D;
}
-input.button:focus, button:focus, input[type=reset]:focus, input[type=submit]:focus, input[class=button]:focus {
+.button:hover, input.button:focus, button:focus, input[type=reset]:focus, input[type=submit]:focus, input[class=button]:focus {
background: #1D3B7D;
}
diff --git a/share/static/css/rudder/forms.css b/share/static/css/rudder/forms.css
index 1fc501c..a10da2b 100644
--- a/share/static/css/rudder/forms.css
+++ b/share/static/css/rudder/forms.css
@@ -43,6 +43,7 @@ div.error .titlebox-title .widget a {
background-position: center -7px
}
+.button,
input[type=reset],
input[type=submit],
input[class=button],
@@ -50,6 +51,8 @@ button,
input,
select { font-size: 1.0em }
+.button,
+.button:visited,
input[type=reset],
input[type=submit],
input[class=button],
@@ -60,11 +63,13 @@ button {
padding: 0.5em;
}
+.button:focus,
input.button:focus,
button:focus,
input[type=reset]:focus,
input[type=submit]:focus,
input[class=button]:focus,
+.button:hover,
input.button:hover,
button:hover,
input[type=reset]:hover,
@@ -73,6 +78,7 @@ input[class=button]:hover {
background: #3D5B9D
}
+.button:active,
input.button:active,
button:active,
input[type=reset]:active,
@@ -81,6 +87,7 @@ input[class=button]:active {
background: #1D3B7D
}
+.button,
input[type=reset],
input[type=submit],
input[class=button],
-----------------------------------------------------------------------
More information about the rt-commit
mailing list