]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
form state vars
authorMark Otto <otto@github.com>
Fri, 30 Nov 2012 23:38:31 +0000 (15:38 -0800)
committerMark Otto <otto@github.com>
Fri, 30 Nov 2012 23:38:31 +0000 (15:38 -0800)
docs/customize.html
docs/templates/pages/customize.mustache
less/alerts.less
less/forms.less
less/labels-badges.less
less/tables.less
less/type.less
less/variables.less

index 4c5cb4f79e7ef6e53691b79110d42c45975ada16..bf564c863df2465bf58dc3b9ee0feca20c304363 100644 (file)
               <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>
index b2e21e71c17cdf7a4f2741fc3fd69c4bf21678e1..e3d993153db38cbc02366af4f6d1e26baabbad18 100644 (file)
               <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>
index 60f0b2a275576d5ac934a15aa36a7fa0cc0dba26..b8a74a81775ccdc41e6cc53add9e94a2d0bcaf02 100644 (file)
   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;
 // -------------------------
 
 .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;
 }
 
 
index a21dd238e1bb7f8d5673d3af6184610f6bc1957f..2d3f018928c4e4778b1ec334d93df8484840ff56 100644 (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;
   }
 }
 
index 6dd8fe0e86051ca1f628ebbd2967cb73623c4258..8440cc4691426383a1c0e37019af9acf54d4be8e 100644 (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%); }
index 58aadf7bbf331378b454c294a371ec6d69cab535..30ef9c9bb4f0961e8f6de22b0bdc53825d3b7949 100644 (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%);
   }
 }
index 2f6dc9a9b960a809ebdedcb8d27c825fde27b037..feb2388f5b255b337fd89d9e2503cca439b6f506 100644 (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
index 6ef5359510c5461ff6dca7c67845b7621a7519a9..0ccd1794316ca7ec9dcdb1ed35e286e91f95045d 100644 (file)
 // 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