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

Conversation

dmitrach
Copy link
Contributor

@dmitrach dmitrach commented Nov 9, 2019

Description

Fixed a bug with the height of the source element. Added property "box-sizing: border-box;"

Screenshots (if appropriate)

Before: https://yadi.sk/i/tsTioPhHB3QNgg
After: https://yadi.sk/i/R1jkMhqK_jDKLQ

Types of changes

Fixed CSS.

  • Chore (tooling change or documentation change)
  • Refactor (non-breaking change which maintains existing functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Fixed a bug with the height of the source element. Added property "box-sizing: border-box;"
@@ -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

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.

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.

None yet

3 participants