Commit f7b27a02 authored by Gleb Mazovetskiy's avatar Gleb Mazovetskiy
Browse files

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.
parent 3e664271
45 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!26437merge,!26197V4 dev xmr,!20778V4 dev,!20539Allow multiple modals,!18047#17986,!18988Blockquote border width,!20854Fixes 15534,!17364Remove all uses of `selector &` to support nested import,!19272V4 dev xmr grunt html,!19581V4 fix popover,!18283Tether docs fix,!20493V4 dev display,!20636Fix docs for heading sizes,!19824blockquote-center,!22547Finished a new translation for bootstrap,!19534Docs 17264,!19533Npm deps,!22143Fix selectable disabled toggle radio buttons,!19084V4 rhythm,!18085Ie9 click comment,!22598test,!18829Add prefix to carousel classes,!18581Check getting started files for broken links - Issue 18568,!18067replace grunt-autoprefixer with gruntpostcss + autoprefixer,!20099V4.0.0 alpha.3,!18477add utility color-contrast function,!18864Feature/navbar toggler support color schemes,!19602V4 palettes arun,!18311V4 dev xmr,!19448New pull request for testing,!19358XXL grid size,!19825.blockquote-center,!17508Fix usage of “its” and “it’s” (v4 docs),!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23178Spinner,!19754Issue template,!19753Card img overlay padding,!19747Blockquote border width,!19580ExitStars,!18684Docs: change "Button" to "Go somewhere",!18661Docs: accessibility fix-up of collapsible content navbar, change site-wide main navbar,!17021v4
Showing with 15 additions and 25 deletions
+15 -25
......@@ -39,8 +39,7 @@
}
&.disabled,
&:disabled,
fieldset[disabled] & {
&:disabled {
cursor: $cursor-disabled;
opacity: .65;
@include box-shadow(none);
......@@ -111,8 +110,7 @@ fieldset[disabled] a.btn {
&,
&:active,
&.active,
&:disabled,
fieldset[disabled] & {
&:disabled {
background-color: transparent;
@include box-shadow(none);
}
......@@ -129,8 +127,7 @@ fieldset[disabled] a.btn {
text-decoration: $link-hover-decoration;
background-color: transparent;
}
&:disabled,
fieldset[disabled] & {
&:disabled {
@include hover-focus {
color: $btn-link-disabled-color;
text-decoration: none;
......
......@@ -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;
}
......
......@@ -19,12 +19,12 @@
&:empty {
display: none;
}
}
// Quick fix for labels in buttons
.btn & {
position: relative;
top: -1px;
}
// Quick fix for labels in buttons
.btn .label {
position: relative;
top: -1px;
}
// Add hover effects, but only for links
......
......@@ -45,8 +45,7 @@
}
&.disabled,
&:disabled,
fieldset[disabled] & {
&:disabled {
&:focus,
&.focus {
background-color: $background;
......@@ -81,8 +80,7 @@
}
&.disabled,
&:disabled,
fieldset[disabled] & {
&:disabled {
&:focus,
&.focus {
border-color: lighten($color, 20%);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment