Skip to content

Commit

Permalink
feat(feature-targeting): Rename main mixins to end with -core-styles (
Browse files Browse the repository at this point in the history
#4404)

BREAKING CHANGE: The main mixins recently introduced to some packages in in v0.44.0 have been renamed from `mdc-foo` to `mdc-foo-core-styles`. (Importing baseline styles via `mdc-foo.scss` remains unaffected.)
  • Loading branch information
mmalerba authored and kfranqueiro committed Feb 12, 2019
1 parent 4c2a63c commit 3102351
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/mdc-button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@import "@material/shape/functions";
@import "./variables";

@mixin mdc-button($query: mdc-feature-all()) {
@mixin mdc-button-core-styles($query: mdc-feature-all()) {
$feat-color: mdc-feature-create-target($query, color);
$feat-structure: mdc-feature-create-target($query, structure);

Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-button/mdc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
//

@import "./mixins";
@include mdc-button;
@include mdc-button-core-styles;
2 changes: 1 addition & 1 deletion packages/mdc-card/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Public
//

@mixin mdc-card($query: mdc-feature-all()) {
@mixin mdc-card-core-styles($query: mdc-feature-all()) {
// postcss-bem-linter: define card

$feat-color: mdc-feature-create-target($query, color);
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-card/mdc-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
//

@import "./mixins";
@include mdc-card;
@include mdc-card-core-styles;
2 changes: 1 addition & 1 deletion packages/mdc-checkbox/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Public
//

@mixin mdc-checkbox($query: mdc-feature-all()) {
@mixin mdc-checkbox-core-styles($query: mdc-feature-all()) {
// postcss-bem-linter: define checkbox

$feat-animation: mdc-feature-create-target($query, animation);
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-checkbox/mdc-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
//

@import "./mixins";
@include mdc-checkbox;
@include mdc-checkbox-core-styles;
2 changes: 1 addition & 1 deletion packages/mdc-list/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Public
//

@mixin mdc-list($query: mdc-feature-all()) {
@mixin mdc-list-core-styles($query: mdc-feature-all()) {
$feat-color: mdc-feature-create-target($query, color);
$feat-structure: mdc-feature-create-target($query, structure);
$feat-typography: mdc-feature-create-target($query, typography);
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-list/mdc-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
// THE SOFTWARE.

@import "./mixins";
@include mdc-list;
@include mdc-list-core-styles;
2 changes: 1 addition & 1 deletion packages/mdc-menu-surface/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Public
//

@mixin mdc-menu-surface($query: mdc-feature-all()) {
@mixin mdc-menu-surface-core-styles($query: mdc-feature-all()) {
$feat-structure: mdc-feature-create-target($query, structure);

// postcss-bem-linter: define menu-surface
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-menu-surface/mdc-menu-surface.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
//

@import "./mixins";
@include mdc-menu-surface;
@include mdc-menu-surface-core-styles;
2 changes: 1 addition & 1 deletion packages/mdc-menu/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@import "@material/ripple/mixins";
@import "./variables";

@mixin mdc-menu($query: mdc-feature-all()) {
@mixin mdc-menu-core-styles($query: mdc-feature-all()) {
$feat-color: mdc-feature-create-target($query, color);
$feat-structure: mdc-feature-create-target($query, structure);

Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-menu/mdc-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
//

@import "./mixins";
@include mdc-menu;
@include mdc-menu-core-styles;
2 changes: 1 addition & 1 deletion packages/mdc-radio/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@import "./functions";
@import "./variables";

@mixin mdc-radio($query: mdc-feature-all()) {
@mixin mdc-radio-core-styles($query: mdc-feature-all()) {
// postcss-bem-linter: define radio

$feat-animation: mdc-feature-create-target($query, animation);
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-radio/mdc-radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
//

@import "./mixins";
@include mdc-radio;
@include mdc-radio-core-styles;
2 changes: 1 addition & 1 deletion packages/mdc-switch/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Public
//

@mixin mdc-switch($query: mdc-feature-all()) {
@mixin mdc-switch-core-styles($query: mdc-feature-all()) {
// postcss-bem-linter: define switch

$feat-animation: mdc-feature-create-target($query, animation);
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-switch/mdc-switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
//

@import "./mixins";
@include mdc-switch;
@include mdc-switch-core-styles;
16 changes: 8 additions & 8 deletions test/scss/feature-targeting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

.mdc-test {
// Button
@include mdc-button($query: mdc-feature-any());
@include mdc-button-core-styles($query: mdc-feature-any());
@include mdc-button-filled-accessible(red, $query: mdc-feature-any());
@include mdc-button-container-fill-color(red, $query: mdc-feature-any());
@include mdc-button-outline-color(red, $query: mdc-feature-any());
Expand All @@ -26,14 +26,14 @@
@include mdc-button-outline-width(0, $query: mdc-feature-any());

// Card
@include mdc-card($query: mdc-feature-any());
@include mdc-card-core-styles($query: mdc-feature-any());
@include mdc-card-fill-color(red, $query: mdc-feature-any());
@include mdc-card-outline(red, $query: mdc-feature-any());
@include mdc-card-shape-radius(0, $query: mdc-feature-any());
@include mdc-card-media-aspect-ratio(1, 1, $query: mdc-feature-any());

// Checkbox
@include mdc-checkbox($query: mdc-feature-any());
@include mdc-checkbox-core-styles($query: mdc-feature-any());
@include mdc-checkbox-container-colors($query: mdc-feature-any());
@include mdc-checkbox-ink-color(red, $query: mdc-feature-any());
@include mdc-checkbox-focus-indicator-color(red, $query: mdc-feature-any());
Expand All @@ -43,7 +43,7 @@
@include mdc-elevation(0, $query: mdc-feature-any());

// List
@include mdc-list($query: mdc-feature-any());
@include mdc-list-core-styles($query: mdc-feature-any());
@include mdc-list-item-primary-text-ink-color(red, $query: mdc-feature-any());
@include mdc-list-item-secondary-text-ink-color(red, $query: mdc-feature-any());
@include mdc-list-item-graphic-fill-color(red, $query: mdc-feature-any());
Expand All @@ -54,17 +54,17 @@
@include mdc-list-group-subheader-ink-color(red, $query: mdc-feature-any());

// Menu
@include mdc-menu($query: mdc-feature-any());
@include mdc-menu-core-styles($query: mdc-feature-any());
@include mdc-menu-width(0, $query: mdc-feature-any());

// Menu Surface
@include mdc-menu-surface($query: mdc-feature-any());
@include mdc-menu-surface-core-styles($query: mdc-feature-any());
@include mdc-menu-surface-fill-color(surface, $query: mdc-feature-any());
@include mdc-menu-surface-ink-color(on-surface, $query: mdc-feature-any());
@include mdc-menu-surface-shape-radius(medium, $query: mdc-feature-any());

// Radio
@include mdc-radio($query: mdc-feature-any());
@include mdc-radio-core-styles($query: mdc-feature-any());
@include mdc-radio-unchecked-stroke-color(red, $query: mdc-feature-any());
@include mdc-radio-checked-stroke-color(red, $query: mdc-feature-any());
@include mdc-radio-ink-color(red, $query: mdc-feature-any());
Expand All @@ -88,7 +88,7 @@
@include mdc-shape-radius(1px 2px, true, $query: mdc-feature-any());

// Switch
@include mdc-switch($query: mdc-feature-any());
@include mdc-switch-core-styles($query: mdc-feature-any());
@include mdc-switch-toggled-on-color(on-surface, $query: mdc-feature-any());
@include mdc-switch-toggled-off-color(on-surface, $query: mdc-feature-any());
@include mdc-switch-toggled-on-ripple-color(on-surface, $query: mdc-feature-any());
Expand Down

0 comments on commit 3102351

Please sign in to comment.