Cannot create theme. "Mixins may not be defined within control directives or other mixins."
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
The .scss file compiles.
What is the current behavior?
Scss complier (I’m using VS2017 and Web Compiler) throws an error “Mixins may not be defined within control directives or other mixins.”.
What are the steps to reproduce?
Importing the theming file from material seems to cause the error.
@import "../node_modules/@angular/material/theming";
What is the use-case or motivation for changing an existing behavior?
Migration from 2.0.0-beta.6
to 2.0.0-beta.7
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.2.2 Material: 2.0.0-beta.7 OS: Windows 10 TypeScript: 2.3.4
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Mixins may not be defined within control directives or other ...
Issue description. Current behavior: Crashes when compiling, with the message: ERROR in ./node_modules/raw-loader!./node_modules ...
Read more >Mixins may not be defined within control directives or other ...
Now, i found the solution there was an issue with node-sass pacakge. so install the. npm i node-sass@4.8.1. package then it works.
Read more >SCSS: Functions may not be defined within control directives
Hello,. I got this message after compiling the file mdb.scss: Error: Functions may not be defined within control directives or other mixins.
Read more >Sass Guidelines
An opinionated styleguide for writing sane, maintainable and scalable Sass.
Read more >Edit a Mixin - Wisej.NET Theme Builder
You cannot create a theme mixin using the Theme Builder. Theme mixins are created in Visual Studio by adding the Theme Mixin component...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found the culprit. The
@mixin mat-input-placeholder-floating
is nested within the@mixin mat-input-typography
.The fix wasn’t a part of the latest beta. You can wait for the next one or install the latest master build: