Skip to content

Broken as of 0.14.4 - invalidConfigPath when using -theme or -config #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hasokeric opened this issue Mar 25, 2025 · 1 comment
Open
Assignees

Comments

@hasokeric
Copy link

hasokeric commented Mar 25, 2025

As of 0.14.4+ there is an error when looking at .scss files and trying to use:

// '$font-family: theme('fontFamily.sans' does not exist in your theme config.(invalidConfigPath)
$font-family: theme('fontFamily.sans'),
   // color: $palettes' does not exist in your theme config.(invalidConfigPath)
  // this has nothing to do with tailwind... but its freaking out over $palletes which is a variable in my scss
    $light-theme: mat.m2-define-light-theme(
        (
            color: $palettes,
        )
    );

Oddly enough if I hover over it, it shows the fonts in the vscode tooltip. When I downgrade to 0.14.3 the errors disappear. Nothing has changed in my codebase for months, besides the extension update.

However if its nested it works for example

@include mat.all-component-themes(
    (
        color: null,
        density: 0,
        typography:
            mat.m2-define-typography-config(
                $font-family: theme('fontFamily.sans'), // <-------- THIS ONE THROWS AN ERROR
                $headline-1:
                    mat.m2-define-typography-level(
                        1.875rem,
                        2.25rem,
                        800,
                        theme('fontFamily.sans') // <------------- THIS ONE DOES NOT, WORKS FINE
                    ),
 ...

If I comment out the first error, it just moves on to the next... like it has a regex problem or something

Image

@hasokeric
Copy link
Author

hasokeric commented Mar 25, 2025

It looks like it doesnt like to be wrapped into *-config( or *-theme(

    $dark-theme: mat.m2-define-dark-theme( <------------ change this to anything but -theme or -config
        (
            color: $palettes,
        )
    );

It may be this commit by @philipp-spiess

Image

@hasokeric hasokeric changed the title Broken as of 0.14.4 - invalidConfigPath Broken as of 0.14.4 - invalidConfigPath when using -theme or -config Mar 25, 2025
@thecrypticace thecrypticace self-assigned this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants