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

Commit

Permalink
fix(rtl): Removed mdc-rtl-include check from mdc-rtl-reflexive mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiomkar committed Aug 29, 2019
1 parent 76c2619 commit 390f1aa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
31 changes: 20 additions & 11 deletions packages/mdc-rtl/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,26 @@
$right-value,
$root-selector: null
) {
@if ($mdc-rtl-include) {
/* @noflip */
#{$left-property}: $left-value;
/* @noflip */
#{$right-property}: $right-value;
@include mdc-rtl-property_($left-property, $left-value);
@include mdc-rtl-property_($right-property, $right-value);

@include mdc-rtl($root-selector) {
/* @noflip */
#{$left-property}: $right-value;
/* @noflip */
#{$right-property}: $left-value;
}
@include mdc-rtl($root-selector) {
@include mdc-rtl-property_($left-property, $right-value);
@include mdc-rtl-property_($right-property, $left-value);
}
}

///
/// Adds `@noflip` annotation when `$mdc-rtl-include` is true.
///
/// @param {String} $property
/// @param {String} $value
/// @access private
///
@mixin mdc-rtl-property_($property, $value) {
@if $mdc-rtl-include {
/* @noflip */
}

#{$property}: #{$value};
}
8 changes: 4 additions & 4 deletions test/screenshot/golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -864,11 +864,11 @@
}
},
"spec/mdc-rtl/variables/include.html": {
"public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/abhiomkar/2019/08/27/16_53_20_055/spec/mdc-rtl/variables/include.html?utm_source=golden_json",
"public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/08/29/20_09_19_957/spec/mdc-rtl/variables/include.html?utm_source=golden_json",
"screenshots": {
"desktop_windows_chrome@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/abhiomkar/2019/08/14/20_18_01_668/spec/mdc-rtl/variables/include.html.windows_chrome_76.png",
"desktop_windows_firefox@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/abhiomkar/2019/08/14/20_18_01_668/spec/mdc-rtl/variables/include.html.windows_firefox_67.png",
"desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/abhiomkar/2019/08/27/16_53_20_055/spec/mdc-rtl/variables/include.html.windows_ie_11.png"
"desktop_windows_chrome@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/abhiomkar/2019/08/28/20_41_24_931/spec/mdc-rtl/variables/include.html.windows_chrome_76.png",
"desktop_windows_firefox@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/abhiomkar/2019/08/28/20_41_24_931/spec/mdc-rtl/variables/include.html.windows_firefox_67.png",
"desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/08/29/20_09_19_957/spec/mdc-rtl/variables/include.html.windows_ie_11.png"
}
},
"spec/mdc-select/classes/baseline-no-js.html": {
Expand Down
1 change: 1 addition & 0 deletions test/screenshot/spec/mdc-rtl/variables/include.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<meta charset="utf-8">
<title>Button without RTL code - MDC Web Screenshot Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- button and text-field styles are included in fixture -->
<link rel="stylesheet" href="../../../out/spec/fixture.css">
<link rel="stylesheet" href="../../../out/spec/mdc-rtl/fixture.css">

Expand Down

0 comments on commit 390f1aa

Please sign in to comment.