material-components-web icon indicating copy to clipboard operation
material-components-web copied to clipboard

Instruct the Sass imports more completely in the Readme

Open wscherphof opened this issue 4 years ago • 0 comments

Feature Request

Clarify the sass imports in the documentation (readme)

Proposed solution

  1. Add that to use the mixins, you must @use "@material/button/mixins";
  2. Add that other components use the same "end names", so you should @use "@material/button/styles" as button-styles;, and @use "@material/button/mixins" as button;:
  3. Add that to use e.g. the filled-accessible mixin, you should then write @include button.filled-accessible():

Alternatives considered

  1. These instructions could also land on the main readme at https://github.com/material-components/material-components-web.
  2. And/or update the Getting Started at https://github.com/material-components/material-components-web/blob/master/docs/getting-started.md to reflect the new imports.

Additional context

For users new to MDC and not normally using sass, these things are quite hard to find out.

wscherphof avatar Jan 24 '22 15:01 wscherphof