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

Commit b0df960

Browse files
Material Web Teamallan-chen
authored andcommitted
Project import generated by Copybara.
PiperOrigin-RevId: 284822775
1 parent 50f110a commit b0df960

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

packages/mdc-checkbox/test/foundation.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ describe('MDCCheckboxFoundation', () => {
139139
* Used to test the behavior of overridding WebIDL properties in different
140140
* browser environments. For example, in Safari WebIDL attributes don't
141141
* return get/set in descriptors.
142-
*/
142+
*/
143143
function withMockCheckboxDescriptorReturning(
144144
descriptor: undefined|typeof DESC_UNDEFINED, runTests: () => void) {
145145
const mockGetOwnPropertyDescriptor =
@@ -152,11 +152,10 @@ describe('MDCCheckboxFoundation', () => {
152152

153153
const originalDesc =
154154
Object.getOwnPropertyDescriptor(Object, 'getOwnPropertyDescriptor');
155-
Object.defineProperty(
156-
Object, 'getOwnPropertyDescriptor', {
157-
...originalDesc,
158-
value: mockGetOwnPropertyDescriptor,
159-
});
155+
Object.defineProperty(Object, 'getOwnPropertyDescriptor', {
156+
...originalDesc,
157+
value: mockGetOwnPropertyDescriptor,
158+
});
160159
runTests();
161160

162161
// After running tests, restore original property.

packages/mdc-fab/_mixins.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ $mdc-fab-ripple-target: ".mdc-fab__ripple";
113113
#{$mdc-fab-ripple-target} {
114114
@include mdc-ripple-target-common($query: $query);
115115

116-
@include mdc-feature-targets($feat-structure) {
117-
overflow: hidden;
118-
}
116+
overflow: hidden;
119117
}
120118
}
121119

packages/mdc-switch/_mixins.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@
146146
&.mdc-switch--checked .mdc-switch__track {
147147
@include mdc-feature-targets($feat-color) {
148148
@include mdc-theme-prop(background-color, $color);
149-
@include mdc-theme-prop(border-color, $color);
150149
}
151150
}
152151
}
@@ -174,7 +173,6 @@
174173
&:not(.mdc-switch--checked) .mdc-switch__track {
175174
@include mdc-feature-targets($feat-color) {
176175
@include mdc-theme-prop(background-color, $color);
177-
@include mdc-theme-prop(border-color, $color);
178176
}
179177
}
180178
}
@@ -272,6 +270,7 @@
272270
@mixin mdc-switch__track_($query: mdc-feature-all()) {
273271
$feat-animation: mdc-feature-create-target($query, animation);
274272
$feat-structure: mdc-feature-create-target($query, structure);
273+
$feat-color: mdc-feature-create-target($query, color);
275274

276275
@include mdc-feature-targets($feat-structure) {
277276
box-sizing: border-box;
@@ -288,6 +287,10 @@
288287
mdc-switch-transition(background-color),
289288
mdc-switch-transition(border-color);
290289
}
290+
291+
@include mdc-feature-targets($feat-color) {
292+
@include mdc-theme-prop(border-color, transparent);
293+
}
291294
}
292295

293296
@mixin mdc-switch__thumb-underlay_($query: mdc-feature-all()) {

testing/helpers/foundation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* THE SOFTWARE.
2222
*/
2323

24+
import 'jasmine';
25+
2426
import {MDCFoundation} from '../../packages/mdc-base/foundation';
2527
import {FoundationConstructor} from './setup';
2628

0 commit comments

Comments
 (0)