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

fix(typography): Separate @material/feature-targeting #5634

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

EstebanG23
Copy link
Contributor

Was causing sass test to fail and blocking PR merging.

@asyncLiz
Copy link
Contributor

@abhiomkar suggested the different syntax, any idea why this would cause tests to fail?

@@ -23,11 +23,12 @@
@use "sass:list";
@use "sass:map";
@use "sass:string";
@use "@material/feature-targeting" as feature-targeting;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about as ft to its clearly different than feature-targeting?

I'm trying to find ways we can take advantage of the _index.scss files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're just looking for another name, I'd recommend feature as a name that is concise and makes sense.

@use "@material/feature-targeting" as feature;

@mixin my-component-core-styles($query: feature.all()) {
  $feat-structure: feature.create-target($query, structure);

  @include feature.targets($feat-structure) {
    // ...
  }
}

Copy link
Contributor Author

@EstebanG23 EstebanG23 Feb 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried both ft and without the as feature-targeting results are as follow:

Error: Can't find stylesheet to import.
26 │ @use "@material/feature-targeting" as ft;

Also do want to add this is blocking other PRs from being merged but I would encourage to file a bug/issue to investigate ways to take advantage of the _index.scss files.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @EstebanG23 for sending a fix! Wondering why Copybara didn't block CL submit when github action failed in first place. 🤔

Sass couldn't compile Sass test files with @import statements since the custom importer doesn't handle new _index files (See testing/featuretargeting/sass-test-compile.helper.ts).

Next steps:

@patrickrodee
Copy link
Contributor

Could be related to webpack-contrib/sass-loader#804

@copybara-service copybara-service bot merged commit ad2e437 into master Feb 20, 2020
@copybara-service copybara-service bot deleted the fix/sass-failure branch February 20, 2020 23:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants