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 #1015 - Survey background colors are now purple when user is premium #1021

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions static/scss/partials/banners.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
ul {
list-style-type: none;
}

.is-premium & {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does the & at the end of this class do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a parent selector, which is pure SCSS Magic™. It's the same as writing .is-premium .recruitment-banner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case, .is-premium is being added to the <body>, so it's influencing/cascading downstream to the banners.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahhh I see! Gotcha

background-color: $color-purple-90;
}
}

.micro-survey-banner {
Expand Down