Skip to content

Remove all uses of selector & to support nested import#17364

Merged
glebm merged 1 commit intov4-devfrom
avoid-parent-selector-suffix2
Sep 5, 2015
Merged

Remove all uses of selector & to support nested import#17364
glebm merged 1 commit intov4-devfrom
avoid-parent-selector-suffix2

Conversation

@glebm
Copy link
Copy Markdown
Member

@glebm glebm commented Aug 27, 2015

If we want to support namespaced import:

.twbs {
  @import 'bootstrap';
}

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

fieldset[disabled] & is not needed as we no longer support IE8.

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.
@glebm glebm changed the title Remove all uses of selector & Remove all uses of selector & to support nested import Aug 27, 2015
@krnlde
Copy link
Copy Markdown
Contributor

krnlde commented Aug 27, 2015

That is a very important decision! Thank you so much, I thought we're the only one namespacing our bootstrap.

@mischah
Copy link
Copy Markdown

mischah commented Aug 27, 2015

👍

@cvrebert
Copy link
Copy Markdown
Collaborator

I'm totally in favor of removing fieldset[disabled] & since it's no longer necessary.

As for the general point, until Sass adds some feature (or folks discover some idiom/workaround) to aid that sort of prefixing, I think CSS postprocessing is still the way to go for that.
However, if the .btn .label change is really the only other required change, then I guess I'm okay with this.

@glebm
Copy link
Copy Markdown
Member Author

glebm commented Aug 29, 2015

We already do other things to support nested import, e.g. see https://github.com/twbs/bootstrap/blob/v4-dev/scss/_reboot.scss#L46, this is the only other change required as far as I can tell.

@chriseppstein
Copy link
Copy Markdown

If future versions need to use &, please note my comment here: sass/sass#1817 (comment)

@mdo
Copy link
Copy Markdown
Member

mdo commented Sep 5, 2015

:shipit:

glebm added a commit that referenced this pull request Sep 5, 2015
Remove all uses of `selector &` to support nested import
@glebm glebm merged commit 79aebf6 into v4-dev Sep 5, 2015
@XhmikosR XhmikosR deleted the avoid-parent-selector-suffix2 branch September 5, 2015 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants