[CheckableButton] 3987 - fix checkbox border issue on focus #3988
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Fixes #3987
First noticed this in Admin, the right border disappears when the bulk actions checkbox is focused.
WHAT is this pull request doing?
After investigation, the issue is with how we're dealing with overlapping borders. Subsequent buttons have a
margin-left: -1px
, so their left border overlaps the right border of the previous element so we don't have a double border:However,
CheckableButton
has aborder-right: none;
. This is fine when the checkbox isn't focused since theEdit customers
button's border overlaps the rightmost 1px of2 selected
regardless of whether there's a border underneath or not, but when the checkbox is focused it's also given an increasedz-index: 20
which is higher than that ofEdit customers
. As a result, the rightmost edge of2 selected
now appears above theEdit customers
border.The fix is to re-introduce a
border-right
to theCheckableButton
. When not focused, the border appears beneath the subsequent button's border. When focused, theCheckableButton
's border is shown.10-53-9ffq8-s68sc.video.mp4
🎩 checklist
README.md
with documentation changes