1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

form state vars

This commit is contained in:
Mark Otto 2012-11-30 15:38:31 -08:00
parent 0a93bc143d
commit e34b3730b7
8 changed files with 68 additions and 68 deletions

View file

@ -349,21 +349,21 @@
<div class="span3">
<h3>Form states &amp; alerts</h3>
<label>@warningText</label>
<label>@state-warning-text</label>
<input type="text" class="span3" placeholder="#c09853">
<label>@warningBackground</label>
<label>@state-warning-background</label>
<input type="text" class="span3" placeholder="#fcf8e3">
<label>@errorText</label>
<label>@state-error-text</label>
<input type="text" class="span3" placeholder="#b94a48">
<label>@errorBackground</label>
<label>@state-error-background</label>
<input type="text" class="span3" placeholder="#f2dede">
<label>@successText</label>
<label>@state-success-text</label>
<input type="text" class="span3" placeholder="#468847">
<label>@successBackground</label>
<label>@state-success-background</label>
<input type="text" class="span3" placeholder="#dff0d8">
<label>@infoText</label>
<label>@state-info-text</label>
<input type="text" class="span3" placeholder="#3a87ad">
<label>@infoBackground</label>
<label>@state-info-background</label>
<input type="text" class="span3" placeholder="#d9edf7">
<h3>Navbar</h3>

View file

@ -281,21 +281,21 @@
<div class="span3">
<h3>{{_i}}Form states &amp; alerts{{/i}}</h3>
<label>@warningText</label>
<label>@state-warning-text</label>
<input type="text" class="span3" placeholder="#c09853">
<label>@warningBackground</label>
<label>@state-warning-background</label>
<input type="text" class="span3" placeholder="#fcf8e3">
<label>@errorText</label>
<label>@state-error-text</label>
<input type="text" class="span3" placeholder="#b94a48">
<label>@errorBackground</label>
<label>@state-error-background</label>
<input type="text" class="span3" placeholder="#f2dede">
<label>@successText</label>
<label>@state-success-text</label>
<input type="text" class="span3" placeholder="#468847">
<label>@successBackground</label>
<label>@state-success-background</label>
<input type="text" class="span3" placeholder="#dff0d8">
<label>@infoText</label>
<label>@state-info-text</label>
<input type="text" class="span3" placeholder="#3a87ad">
<label>@infoBackground</label>
<label>@state-info-background</label>
<input type="text" class="span3" placeholder="#d9edf7">
<h3>{{_i}}Navbar{{/i}}</h3>

View file

@ -10,14 +10,14 @@
padding: 8px 35px 8px 14px;
margin-bottom: @line-height-base;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
background-color: @warningBackground;
border: 1px solid @warningBorder;
background-color: @state-warning-background;
border: 1px solid @state-warning-border;
border-radius: @border-radius-base;
}
.alert,
.alert h4 {
// Specified for the h4 to prevent conflicts of changing @headingsColor
color: @warningText;
color: @state-warning-text;
}
.alert h4 {
margin: 0;
@ -36,20 +36,20 @@
// -------------------------
.alert-success {
background-color: @successBackground;
border-color: @successBorder;
color: @successText;
background-color: @state-success-background;
border-color: @state-success-border;
color: @state-success-text;
}
.alert-danger,
.alert-error {
background-color: @errorBackground;
border-color: @errorBorder;
color: @errorText;
background-color: @state-error-background;
border-color: @state-error-border;
color: @state-error-text;
}
.alert-info {
background-color: @infoBackground;
border-color: @infoBorder;
color: @infoText;
background-color: @state-info-background;
border-color: @state-info-border;
color: @state-info-text;
}

View file

@ -355,19 +355,19 @@ input[type="checkbox"][readonly] {
// Warning
.control-group.warning {
.formFieldState(@warningText, @warningText, @warningBackground);
.formFieldState(@state-warning-text, @state-warning-text, @state-warning-background);
}
// Error
.control-group.error {
.formFieldState(@errorText, @errorText, @errorBackground);
.formFieldState(@state-error-text, @state-error-text, @state-error-background);
}
// Success
.control-group.success {
.formFieldState(@successText, @successText, @successBackground);
.formFieldState(@state-success-text, @state-success-text, @state-success-background);
}
// Success
.control-group.info {
.formFieldState(@infoText, @infoText, @infoBackground);
.formFieldState(@state-info-text, @state-info-text, @state-info-background);
}
// HTML5 invalid states
@ -479,8 +479,8 @@ select:focus:invalid {
border-radius: 0;
}
.active {
background-color: @successBackground;
border-color: @successText;
background-color: @state-success-background;
border-color: @state-success-text;
}
}

View file

@ -50,17 +50,17 @@ a {
.label,
.badge {
// Important (red)
&-danger { background-color: @errorText; }
&-danger[href] { background-color: darken(@errorText, 10%); }
&-danger { background-color: @state-error-text; }
&-danger[href] { background-color: darken(@state-error-text, 10%); }
// Warnings (orange)
&-warning { background-color: #f89406; }
&-warning[href] { background-color: darken(#f89406, 10%); }
// Success (green)
&-success { background-color: @successText; }
&-success[href] { background-color: darken(@successText, 10%); }
&-success { background-color: @state-success-text; }
&-success[href] { background-color: darken(@state-success-text, 10%); }
// Info (turquoise)
&-info { background-color: @infoText; }
&-info[href] { background-color: darken(@infoText, 10%); }
&-info { background-color: @state-info-text; }
&-info[href] { background-color: darken(@state-info-text, 10%); }
// Inverse (black)
&-inverse { background-color: @grayDark; }
&-inverse[href] { background-color: darken(@grayDark, 10%); }

View file

@ -183,31 +183,31 @@ table th[class*="span"],
.table tbody tr {
&.success td {
background-color: @successBackground;
background-color: @state-success-background;
}
&.error td {
background-color: @errorBackground;
background-color: @state-error-background;
}
&.warning td {
background-color: @warningBackground;
background-color: @state-warning-background;
}
&.info td {
background-color: @infoBackground;
background-color: @state-info-background;
}
}
// Hover states for .table-hover
.table-hover tbody tr {
&.success:hover td {
background-color: darken(@successBackground, 5%);
background-color: darken(@state-success-background, 5%);
}
&.error:hover td {
background-color: darken(@errorBackground, 5%);
background-color: darken(@state-error-background, 5%);
}
&.warning:hover td {
background-color: darken(@warningBackground, 5%);
background-color: darken(@state-warning-background, 5%);
}
&.info:hover td {
background-color: darken(@infoBackground, 5%);
background-color: darken(@state-info-background, 5%);
}
}

View file

@ -31,17 +31,17 @@ cite { font-style: normal; }
.muted { color: @grayLight; }
a.muted:hover { color: darken(@grayLight, 10%); }
.text-warning { color: @warningText; }
a.text-warning:hover { color: darken(@warningText, 10%); }
.text-warning { color: @state-warning-text; }
a.text-warning:hover { color: darken(@state-warning-text, 10%); }
.text-error { color: @errorText; }
a.text-error:hover { color: darken(@errorText, 10%); }
.text-error { color: @state-error-text; }
a.text-error:hover { color: darken(@state-error-text, 10%); }
.text-info { color: @infoText; }
a.text-info:hover { color: darken(@infoText, 10%); }
.text-info { color: @state-info-text; }
a.text-info:hover { color: darken(@state-info-text, 10%); }
.text-success { color: @successText; }
a.text-success:hover { color: darken(@successText, 10%); }
.text-success { color: @state-success-text; }
a.text-success:hover { color: darken(@state-success-text, 10%); }
// Headings

View file

@ -210,21 +210,21 @@
// Form states and alerts
// -------------------------
@warningText: #c09853;
@warningBackground: #fcf8e3;
@warningBorder: darken(spin(@warningBackground, -10), 3%);
@state-warning-text: #c09853;
@state-warning-background: #fcf8e3;
@state-warning-border: darken(spin(@state-warning-background, -10), 3%);
@errorText: #b94a48;
@errorBackground: #f2dede;
@errorBorder: darken(spin(@errorBackground, -10), 3%);
@state-error-text: #b94a48;
@state-error-background: #f2dede;
@state-error-border: darken(spin(@state-error-background, -10), 3%);
@successText: #468847;
@successBackground: #dff0d8;
@successBorder: darken(spin(@successBackground, -10), 5%);
@state-success-text: #468847;
@state-success-background: #dff0d8;
@state-success-border: darken(spin(@state-success-background, -10), 5%);
@infoText: #3a87ad;
@infoBackground: #d9edf7;
@infoBorder: darken(spin(@infoBackground, -10), 7%);
@state-info-text: #3a87ad;
@state-info-background: #d9edf7;
@state-info-border: darken(spin(@state-info-background, -10), 7%);
// Tooltips and popovers