question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot create theme. "Mixins may not be defined within control directives or other mixins."

See original GitHub issue

Bug, 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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
Nathan-Ryancommented, Jun 20, 2017

Found the culprit. The @mixin mat-input-placeholder-floating is nested within the @mixin mat-input-typography.

3reactions
crisbetocommented, Jun 26, 2017

The fix wasn’t a part of the latest beta. You can wait for the next one or install the latest master build:

npm install angular/material2-builds angular/cdk-builds
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found