Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move the current selector to fix scoping issues #1728

Merged
merged 2 commits into from
Feb 6, 2019

Conversation

cal-smith
Copy link
Contributor

Closes #1711 for all instances that I'm presently aware of

TL;DR from the issue:

If & is used as a second level selector, it inherits the entire first level selector. So .#{$prefix}--structured-list-row becomes .carbon .bx--structured-list-row and

.#{$prefix}--structured-list--selection &:hover:not(.#{$prefix}--structured-list-row--header-row)

becomes

.bx--structured-list--selection .carbon .bx--structured-list-row:hover:not(.bx--structured-list-row--header-row)

instead of

.carbon .bx--structured-list--selection .bx--structured-list-row:hover:not(.bx--structured-list-row--header-row)

This PR moves a few of the selectors around. This does result in a few styles moving away from their direct container, but it does express the intent of the selectors better.

As far as I can tell none of the X styles are affected by this.

@netlify
Copy link

netlify bot commented Feb 5, 2019

Deploy preview for the-carbon-components ready!

Built with commit 2294c23

https://deploy-preview-1728--the-carbon-components.netlify.com

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - Thanks @cal-smith!

Copy link
Contributor

@lovemecomputer lovemecomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome thanks for catching this!

@carbon-bot
Copy link
Contributor

🎉 This PR is included in version 9.70.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scoping SCSS under a different body class breaks some components
5 participants