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.

[Radio] Undefined mixin

See original GitHub issue

Bug report

When upgrade to 8.0.0, @include radio.core-styles causes an undefined mixin error.

Steps to reproduce

Follow the README.

Here is the code;

@use '@material/form-field';
@use '@material/radio';

@include form-field.core-styles;
@include radio.core-styles;

Actual behavior

    ERROR in ./src/ui/dialog/details/style.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/ui/dialog/details/style.scss)
    Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
    SassError: Undefined mixin.
      ╷
    7 │ @include radio.core-styles;
      │ ^^^^^^^^^^^^^^^^^^^^^^^^^^
      ╵
      src/ui/dialog/details/style.scss 7:1  root stylesheet

Your Environment:

Software Version(s)
MDC Web 8.0.0
Browser Firefox
Operating System Ubuntu 16.04 & 18.04

Possible solution

Could be resolved by updating to:

@use '@material/form-field';
@use '@material/radio/mdc-radio';

@include form-field.core-styles;
// @include radio.core-styles;

I’m not familiar with Sass and not sure if it’s the correct way to use it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lucka-mecommented, Nov 13, 2020

Okay, then I will keep this issue open until the team update the README or code.

1reaction
agnelcommented, Feb 10, 2021

I have a exactly the same issue with @include button.core-styles. It works with @use 'material/button/styles'. But since i need to use the radio also, using @use 'material/button/styles' and @use 'material/radio/styles', throw this error - Error: There's already a module with namespace "styles". How do I use them together…?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sass compiler throws 'undefined mixin' error ... - Stack Overflow
Sass compiler throws 'undefined mixin' error when mixins are kept in seperate folder · Sass doesn't throw this error for no reason, and...
Read more >
@material/radio - NPM Package Overview - Socket
Start using Socket to analyze @material/radio and its 10 ... radio: Modify theme styles Sass mixin validation to validate only keys (390220e) ...
Read more >
Ext.form.field.Radio | Ext JS 6.2.0 - Sencha Documentation
The rendering template for the field decorations. Component classes using this mixin should include logic to use this as their renderTpl, and implement...
Read more >
dijit/form/RadioButton (1.9) - The Dojo Toolkit
Returns:undefined. buildRendering(). Defined by dijit/_WidgetBase. Construct the UI for this widget, setting this.domNode. Most widgets will mixin dijit.
Read more >
Core/widget/Radio | Bryntum TaskBoard
Radio The Radio widget wraps an element. Color can be specified and ... Applies one or more mixins to this class and returns...
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