Skip to content

Commit

Permalink
fix(shape): Add noflip comments, fix RTL for categories (material-com…
Browse files Browse the repository at this point in the history
  • Loading branch information
kfranqueiro authored Nov 27, 2018
1 parent 379c522 commit 62054f8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/mdc-shape/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@
@import "./functions";

@mixin mdc-shape-radius($radius, $rtl-reflexive: false) {
// Even if $rtl-reflexive is true, only emit RTL styles if we can't easily tell that the given radius is symmetrical
$needs-flip: $rtl-reflexive and length($radius) > 1;

@if ($needs-flip) {
/* @noflip */
}

border-radius: mdc-shape-prop-value($radius);

@if ($rtl-reflexive) {
@if ($needs-flip) {
@include mdc-rtl {
border-radius: mdc-shape-flip-radius($radius);
/* @noflip */
border-radius: mdc-shape-flip-radius(mdc-shape-prop-value($radius));
}
}
}

0 comments on commit 62054f8

Please sign in to comment.