mirror of https://github.com/twbs/bootstrap.git
Merge branch '3.0.0-wip' of https://github.com/cvrebert/bootstrap into cvrebert-3.0.0-wip
Conflicts: docs/assets/css/bootstrap.css less/mixins.less
This commit is contained in:
commit
09dde5c84a
|
@ -1127,7 +1127,10 @@ select[disabled],
|
||||||
textarea[disabled],
|
textarea[disabled],
|
||||||
input[readonly],
|
input[readonly],
|
||||||
select[readonly],
|
select[readonly],
|
||||||
textarea[readonly] {
|
textarea[readonly],
|
||||||
|
fieldset[disabled] input,
|
||||||
|
fieldset[disabled] select,
|
||||||
|
fieldset[disabled] textarea {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
background-color: #eeeeee;
|
background-color: #eeeeee;
|
||||||
}
|
}
|
||||||
|
@ -1135,7 +1138,9 @@ textarea[readonly] {
|
||||||
input[type="radio"][disabled],
|
input[type="radio"][disabled],
|
||||||
input[type="checkbox"][disabled],
|
input[type="checkbox"][disabled],
|
||||||
input[type="radio"][readonly],
|
input[type="radio"][readonly],
|
||||||
input[type="checkbox"][readonly] {
|
input[type="checkbox"][readonly],
|
||||||
|
fieldset[disabled] input[type="radio"],
|
||||||
|
fieldset[disabled] input[type="checkbox"] {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2583,7 +2588,8 @@ button.close {
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn.disabled,
|
.btn.disabled,
|
||||||
.btn[disabled] {
|
.btn[disabled],
|
||||||
|
fieldset[disabled] .btn {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
opacity: 0.65;
|
opacity: 0.65;
|
||||||
filter: alpha(opacity=65);
|
filter: alpha(opacity=65);
|
||||||
|
@ -2753,7 +2759,8 @@ input[type="button"].btn-block {
|
||||||
|
|
||||||
.btn-link,
|
.btn-link,
|
||||||
.btn-link:active,
|
.btn-link:active,
|
||||||
.btn-link[disabled] {
|
.btn-link[disabled],
|
||||||
|
fieldset[disabled] .btn-link {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-box-shadow: none;
|
-webkit-box-shadow: none;
|
||||||
|
@ -2773,7 +2780,8 @@ input[type="button"].btn-block {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-link[disabled]:hover {
|
.btn-link[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-link:hover {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1649,6 +1649,44 @@ For example, <code><section></code> should be wrapped as inlin
|
||||||
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<h3>Disabled fieldsets</h3>
|
||||||
|
<p>Add the <code>disabled</code> attribute on a <code>fieldset</code> to disable all the controls within the fieldset at once.</p>
|
||||||
|
<form class="bs-docs-example form-inline">
|
||||||
|
<fieldset disabled>
|
||||||
|
<input type="text" class="span4" placeholder="These controls are all disabled just">
|
||||||
|
<select class="span4">
|
||||||
|
<option>by being under a disabled fieldset</option>
|
||||||
|
</select>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox"> Can't check this
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<pre class="prettyprint linenums">
|
||||||
|
<form class="form-inline">
|
||||||
|
<fieldset disabled>
|
||||||
|
<input type="text" class="span4" placeholder="These controls are all disabled just">
|
||||||
|
<select class="span4">
|
||||||
|
<option>by being under a disabled fieldset</option>
|
||||||
|
</select>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox"> Can't check this
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
<span class="label label-info">Heads up!</span>
|
||||||
|
Contrary to the HTML5 spec, form controls within a <code>fieldset</code>'s <code>legend</code> will also be disabled.<br>
|
||||||
|
Also, <code><a></code> buttons within a <code>fieldset[disabled]</code> will be styled like they each had the <code>.disabled</code> class, but this only affects aesthetics; you must use custom JavaScript to actually make such links non-functional.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Validation states</h3>
|
<h3>Validation states</h3>
|
||||||
<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
|
<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
|
||||||
|
|
||||||
|
|
|
@ -1589,6 +1589,44 @@ For example, <code><section></code> should be wrapped as inlin
|
||||||
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<h3>Disabled fieldsets</h3>
|
||||||
|
<p>Add the <code>disabled</code> attribute on a <code>fieldset</code> to disable all the controls within the fieldset at once.</p>
|
||||||
|
<form class="bs-docs-example form-inline">
|
||||||
|
<fieldset disabled>
|
||||||
|
<input type="text" class="span4" placeholder="These controls are all disabled just">
|
||||||
|
<select class="span4">
|
||||||
|
<option>by being under a disabled fieldset</option>
|
||||||
|
</select>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox"> Can't check this
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<pre class="prettyprint linenums">
|
||||||
|
<form class="form-inline">
|
||||||
|
<fieldset disabled>
|
||||||
|
<input type="text" class="span4" placeholder="These controls are all disabled just">
|
||||||
|
<select class="span4">
|
||||||
|
<option>by being under a disabled fieldset</option>
|
||||||
|
</select>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox"> Can't check this
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
<span class="label label-info">Heads up!</span>
|
||||||
|
Contrary to the HTML5 spec, form controls within a <code>fieldset</code>'s <code>legend</code> will also be disabled.<br>
|
||||||
|
Also, <code><a></code> buttons within a <code>fieldset[disabled]</code> will be styled like they each had the <code>.disabled</code> class, but this only affects aesthetics; you must use custom JavaScript to actually make such links non-functional.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Validation states</h3>
|
<h3>Validation states</h3>
|
||||||
<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
|
<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled,
|
&.disabled,
|
||||||
&[disabled] {
|
&[disabled],
|
||||||
|
fieldset[disabled] & {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
.opacity(65);
|
.opacity(65);
|
||||||
.box-shadow(none);
|
.box-shadow(none);
|
||||||
|
@ -138,7 +139,8 @@ input[type="button"] {
|
||||||
// Make a button look and behave like a link
|
// Make a button look and behave like a link
|
||||||
.btn-link,
|
.btn-link,
|
||||||
.btn-link:active,
|
.btn-link:active,
|
||||||
.btn-link[disabled] {
|
.btn-link[disabled],
|
||||||
|
fieldset[disabled] .btn-link {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
.box-shadow(none);
|
.box-shadow(none);
|
||||||
|
@ -154,7 +156,12 @@ input[type="button"] {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
.btn-link[disabled]:hover {
|
.btn-link {
|
||||||
color: @grayDark;
|
&[disabled],
|
||||||
text-decoration: none;
|
fieldset[disabled] & {
|
||||||
|
&:hover {
|
||||||
|
color: @grayDark;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,21 +331,24 @@ textarea[class*="span"],
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
// Disabled and read-only inputs
|
// Disabled and read-only inputs
|
||||||
input[disabled],
|
input,
|
||||||
select[disabled],
|
select,
|
||||||
textarea[disabled],
|
textarea {
|
||||||
input[readonly],
|
&[disabled],
|
||||||
select[readonly],
|
&[readonly],
|
||||||
textarea[readonly] {
|
fieldset[disabled] & {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
background-color: @input-background-disabled;
|
background-color: @input-background-disabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Explicitly reset the colors here
|
// Explicitly reset the colors here
|
||||||
input[type="radio"][disabled],
|
input[type="radio"],
|
||||||
input[type="checkbox"][disabled],
|
input[type="checkbox"] {
|
||||||
input[type="radio"][readonly],
|
&[disabled],
|
||||||
input[type="checkbox"][readonly] {
|
&[readonly],
|
||||||
background-color: transparent;
|
fieldset[disabled] & {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -415,8 +415,8 @@
|
||||||
&:active,
|
&:active,
|
||||||
&.active {
|
&.active {
|
||||||
color: @text-color;
|
color: @text-color;
|
||||||
background-position: 0 -15px;
|
|
||||||
background-color: @background-end;
|
background-color: @background-end;
|
||||||
|
background-position: 0 -15px;
|
||||||
}
|
}
|
||||||
&:active,
|
&:active,
|
||||||
&.active {
|
&.active {
|
||||||
|
|
Loading…
Reference in New Issue