I'm migrating to v5 and while trying to override headline styles using the sass modules syntax an error is displayed during the compilation phase.
@use "@material/typography" with (
$styles-headline1: (
font-weight: 300,
),
);
formatted: `Error: This module was already loaded, so it can't be configured using "with".\n` +
' โโโ> node_modules/@material/typography/_index.scss\n' +
'3 โ @forward "./functions";\n' +
' โ ^^^^^^^^^^^^^^^^^^^^^^ new load\n' +
' โต\n' +
' โโโ> node_modules/@material/typography/_variables.scss\n' +
'25 โ @use "./functions";\n' +
' โ โโโโโโโโโโโโโโโโโโ original load\n' +
Styles should be overwritten.
I'm able to overwrite the font-family without issues when i compile:
@use "@material/typography" with (
$font-family: unquote("MyCustomFont, Verdana, Arial, sans-serif")
);
I'm following the steps described in https://github.com/material-components/material-components-web/tree/master/packages/mdc-typography#overriding-styles
Duplicate of #5621. This issue was fixed today but has not been released yet. You can verify the fix by installing the canary version of @material/typography.
I'll check in tomorrow to see if there's a patch release on the horizon that we can cut.
Thank you @asyncLiz, i appreciate you quick reply on this.
I'll check in tomorrow to see if there's a patch release on the horizon that we can cut.
That will be great! So i will be able to continue the migration to v5.
Should be published now in v5.1.0.
Most helpful comment
Should be published now in v5.1.0.