-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Updates the native and custom checks to use flexbox #25184
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,7 @@ | |
|
||
.custom-control { | ||
position: relative; | ||
display: block; | ||
min-height: (1rem * $line-height-base); | ||
padding-left: $custom-control-gutter; | ||
display: flex; | ||
} | ||
|
||
.custom-control-inline { | ||
|
@@ -57,16 +55,15 @@ | |
// Build the custom controls out of psuedo-elements. | ||
|
||
.custom-control-label { | ||
display: flex; | ||
margin-bottom: 0; | ||
|
||
// Background-color and (when enabled) gradient | ||
&::before { | ||
position: absolute; | ||
top: (($line-height-base - $custom-control-indicator-size) / 2); | ||
left: 0; | ||
display: block; | ||
width: $custom-control-indicator-size; | ||
height: $custom-control-indicator-size; | ||
margin-top: (($line-height-base - $custom-control-indicator-size) / 2); | ||
pointer-events: none; | ||
content: ""; | ||
user-select: none; | ||
|
@@ -87,6 +84,10 @@ | |
background-position: center center; | ||
background-size: $custom-control-indicator-bg-size; | ||
} | ||
|
||
&:not(:empty)::before { | ||
margin-right: $custom-control-gutter; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
} | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,14 +207,12 @@ select.form-control-lg { | |
|
||
.form-check { | ||
position: relative; | ||
display: block; | ||
padding-left: $form-check-input-gutter; | ||
display: flex; | ||
} | ||
|
||
.form-check-input { | ||
position: absolute; | ||
margin-top: $form-check-input-margin-y; | ||
margin-left: -$form-check-input-gutter; | ||
margin-right: $form-check-input-gutter; | ||
|
||
&:disabled ~ .form-check-label { | ||
color: $text-muted; | ||
|
@@ -228,15 +226,12 @@ select.form-control-lg { | |
.form-check-inline { | ||
display: inline-flex; | ||
align-items: center; | ||
padding-left: 0; // Override base .form-check | ||
margin-right: $form-check-inline-margin-x; | ||
|
||
// Undo .form-check-input defaults and add some `margin-right`. | ||
.form-check-input { | ||
position: static; | ||
margin-top: 0; | ||
margin-right: $form-check-inline-input-margin-x; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should $form-check-inline-input-margin-x be consolidated with $form-check-input-gutter? |
||
margin-left: 0; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same display: flex in my pull request, but now I'm trying to remember the reason for even having it. Does removing this cause any negative effect? Or does it have a purpose for inclusion? I fiddled around a bit and didn't see a reason for just leaving the display property off... what do you think?