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

Update choices.scss. Fixed a bug with the height of the source element. #749

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions src/styles/choices.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ $choices-icon-cross-inverse: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiI
font-size: $choices-font-size-md;
min-height: 44px;
overflow: hidden;
box-sizing: border-box;
Copy link
Collaborator

@jshjohnson jshjohnson Nov 10, 2019

Choose a reason for hiding this comment

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

Instead of applying this to specific selectors, could we not just apply to everything within the .choices class?

Something like:

.choices *, .choices *:before, .choices *:after { {
  box-sizing: border-box;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can apply to everything selectors, but we will lose a little performance.
I noticed that this is necessary for two classes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Universal selectors are slow and box-sizing is inheriting to children, so, agree with @dios-oleg that those styles better be applied when needed.

.is-focused &,
.is-open & {
border-color: darken($choices-keyline-color, 15%);
Expand Down