Skip to content
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

How to use Primeflex with Dart SASS? #206

Open
muuvmuuv opened this issue Jan 18, 2024 · 1 comment
Open

How to use Primeflex with Dart SASS? #206

muuvmuuv opened this issue Jan 18, 2024 · 1 comment

Comments

@muuvmuuv
Copy link

muuvmuuv commented Jan 18, 2024

When building with Vite/esbuild in Angular new application builder, this import is deprecated and any further @include on primeflex mixins wont work. New Dart SASS uses @use now.

@import "primeflex/primeflex";
.p-card {
  .p-card-header,
  .p-card-body {
    @include style-class("px-4 pt-4");
  }
}
Application bundle generation failed. [0.520 seconds]
✘ [ERROR] Undefined mixin.
  ╷
6 │     @include style-class("px-4 pt-4");
  │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src/theme/_overrides.scss 6:5  @import
  src/theme/main.scss 13:9       root stylesheet [plugin angular-sass]

    angular:styles/global:styles:4:8:
      4 │ @import 'src/theme/main.scss';
@muuvmuuv
Copy link
Author

My bad, wrong mixing, this works:

@use "primeflex/core/_utils" as *;

Still a bit hacky.

This would look better:

@use "primeflex/utils" as *;

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

1 participant