1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-27 07:14:36 +02:00

Remove all uses of selector &

If we want to support namespaced import:

```scss
.twbs {
  @import 'bootstrap';
}
```

We cannot use `selector &`, see sass/sass#1817.

`fieldset[disabled] &` is not needed as we no longer support IE8.
This commit is contained in:
Gleb Mazovetskiy
2015-08-27 13:10:32 +01:00
parent 3e66427127
commit f7b27a02ce
4 changed files with 15 additions and 25 deletions

View File

@@ -50,15 +50,13 @@
// disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway.
&:disabled,
&[readonly],
fieldset[disabled] & {
&[readonly] {
background-color: $input-bg-disabled;
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
opacity: 1;
}
&[disabled],
fieldset[disabled] & {
&:disabled {
cursor: $cursor-disabled;
}
}
@@ -233,24 +231,21 @@
input[type="radio"],
input[type="checkbox"] {
&:disabled,
&.disabled,
fieldset[disabled] & {
&.disabled {
cursor: $cursor-disabled;
}
}
// These classes are used directly on <label>s
.radio-inline,
.checkbox-inline {
&.disabled,
fieldset[disabled] & {
&.disabled {
cursor: $cursor-disabled;
}
}
// These classes are used on elements with <label> descendants
.radio,
.checkbox {
&.disabled,
fieldset[disabled] & {
&.disabled {
label {
cursor: $cursor-disabled;
}