Components: Sass still unavaliable in alpha.6

Created on 1 Jul 2016  路  6Comments  路  Source: angular/components

Sass inside packages are still broken.

There is css and scss files now with same name, so @import inside scss files of material2 don't know which file should be imported (css or scss), and returns an error.

I think this can be fixed if you put extensions in scss files of material 2, or remove all css files from the package styles dir (move somewhere).

One more time:
I am trying to import variables.scss like:

@import "node_modules/@angular2-material/core/style/variables.scss";

and get error:

Error: It's not clear which file to import for '@import "theme-functions"'.
Candidates:
  _theme-functions.scss
  _theme-functions.css
Please delete or rename all but one of these files.

This error comes from your variables.scss
I also pointed this error earlier: https://github.com/angular/material2/issues/533#issuecomment-223513305

Most helpful comment

+1 on that. The @import method looks for .scss and .css and since there is both it's doesn't know which file to import. Could also be fixed by importing the 'theme-functions' with the extension or move the output of the sass files into a different folder.

image

All 6 comments

+1 on that. The @import method looks for .scss and .css and since there is both it's doesn't know which file to import. Could also be fixed by importing the 'theme-functions' with the extension or move the output of the sass files into a different folder.

image

I ended up deleting all of the CSS files, problem is when you update to the latest version it brings them back so you have to go through and delete them again.

+1
Please add .scss extentions to @import or put .scss and .css files in different folders.

Seems like it's not a big hassle to get this working. Monitoring this thread for changes.

Closing this since theming is available now.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alanpurple picture alanpurple  路  3Comments

kara picture kara  路  3Comments

Miiekeee picture Miiekeee  路  3Comments

RoxKilly picture RoxKilly  路  3Comments

Hiblton picture Hiblton  路  3Comments