Skip to content

Commit

Permalink
fix(checkbox): Alignment fix to center in all tables (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonjoseph authored and tw15egan committed Jan 16, 2018
1 parent 5888289 commit 460015f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
16 changes: 11 additions & 5 deletions src/components/checkbox/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
cursor: pointer;
position: relative;
padding-left: rem(25px);
min-height: rem(16px);
}

.#{$prefix}--checkbox-label::before {
box-sizing: border-box;
content: '';
position: absolute;
left: 0;
top: -2px;
height: rem(18px);
width: rem(18px);
border: $checkbox-border-width solid $ui-05;
Expand All @@ -56,8 +56,9 @@
border-bottom: 2px solid $inverse-01;
transform: scale(0) rotate(-45deg);
position: absolute;
top: 2px;
left: 3px;
left: rem(3px);
top: 50%;
margin-top: rem(-5px);
}

.#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-label::before,
Expand Down Expand Up @@ -91,7 +92,7 @@
border-bottom: 2px solid $inverse-01;
opacity: 1;
width: rem(12px);
top: rem(1px);
margin-top: rem(-6px);
}

.#{$prefix}--checkbox-appearance {
Expand All @@ -103,7 +104,12 @@
margin-right: 0.5rem;
background-color: $ui-01;
border: $checkbox-border-width solid $ui-05;
min-width: 18px;
min-width: rem(18px);
}

// Backwards compatibilty for old checkbox html using .#{$prefix}--checkbox-appearance
.#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-label .#{$prefix}--checkbox-appearance {
top: rem(-1px);
}

.#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-appearance,
Expand Down
3 changes: 1 addition & 2 deletions src/components/data-table-v2/_data-table-v2-core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@

// Overrrides
.#{$prefix}--checkbox-label {
margin-top: rem(-8px);
padding-left: rem(22px);
padding-left: rem(28px);
}

.#{$prefix}--overflow-menu {
Expand Down

0 comments on commit 460015f

Please sign in to comment.