Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fix(checkbox): Remove duplicate background props (#1812)
Browse files Browse the repository at this point in the history
The `mdc-checkbox__background` mixin included the
`mdc-checkbox__child--cover-parent-` mixin which set the positioning for
the element on all sides to 0. However, the `mdc-rtl-reflexive-position`
mixin **also** sets left and right positioning and the
`mdc-checkbox__background` mixin **also** set the top positioning,
resulting in duplicate properties when compiled out to CSS. This fix
removes the colliding `mdc-checkbox__child--cover-parent-` mixin and
sets only the remaining properties (`position` and `bottom`) to what
they normally be.
  • Loading branch information
patrickrodee authored Dec 21, 2017
1 parent 255b63e commit d3a2901
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mdc-checkbox/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,13 @@
}

@mixin mdc-checkbox__background_ {
@include mdc-checkbox__child--cover-parent_;
@include mdc-rtl-reflexive-position(
left, ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2, ".mdc-checkbox");

display: inline-flex;
position: absolute;
top: ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2;
bottom: 0;
align-items: center;
justify-content: center;
box-sizing: border-box;
Expand Down

0 comments on commit d3a2901

Please sign in to comment.