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

Move to @use/@forward instead of @import #7

Open
aulonm opened this issue May 25, 2021 · 5 comments
Open

Move to @use/@forward instead of @import #7

aulonm opened this issue May 25, 2021 · 5 comments
Labels

Comments

@aulonm
Copy link

aulonm commented May 25, 2021

Any plans of changing the style from using @import statements to @use/@forward since @import is going to be deprecated soon and they advise users to use the new methods.

ref

I've been trying to change my project to use @use and @forward but its not working that well with griddle.

Was wondering if you guys have tried to use the new methods instead at the same time as import-methods. Not sure if they can coexist though, so it may be a breaking change..

Starting to get deprecation warnings when using newest Dart Sass (ref)
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

@andrew-boyd
Copy link
Member

@aulonm thanks for the heads up! This was actually not on my radar. I have some reading to do.

@andrew-boyd
Copy link
Member

andrew-boyd commented May 25, 2021

@aulonm Read up on this. I think I could get it working for really simple use-cases, but it's going to be a hard time with support for anything using complex loading systems (such as Nuxt). It looks like @import will be supported through at least 2022 so I'm going to leave this issue open and revisit it when ecosystem support for the new @use and @forward statements is more mature.

I've pushed my tinkering on the branch feature/sass-statement-upgrade if you want to take a look. It worked for me locally in a Vue3 + Vite setup, but like I mentioned much more issues when trying to use in a Vue2 + Nuxt project. Note that this branch includes the vue3 branch so you'll need to be running Vue 3 to test it.

@aulonm
Copy link
Author

aulonm commented May 26, 2021

Thats amazing, thanks for the thorough feedback! I was actually trying to get it to work with my new project running vue3 and came to the conclusion that you would need to rewrite the package for vue3.

Typescript support would also be awesome, but thats not really the highest priority. Your lib has been amazing to work with none the less and it made our development much smoother and faster

@andrew-boyd
Copy link
Member

@aulonm That's great to hear! Personally I can't stand to work on projects withou a visual grid in the browser now. I've ruined other grid systemes for myself! 😄

95% of the package is the Sass mixins, so overall Griddle should be pretty framework agnostic. The "vue" layer is just a simple component registration to show the overlay. The Vue3 upgrade only required small changes to the render function is handled.

@aulonm
Copy link
Author

aulonm commented May 28, 2021

Just an FYI while you work on vue3 and new sass version support. I copied the code from your branch and changed it to support Typescript for my own project, until you update and release a new version. I'm still using version 2.3.1 but instead of importing the vue-file I just use my own and then change back to yours when v3 is released 🙌

I added the file here so you can have a look if you ever want to support Typescript some time: https://gist.github.com/aulonm/394f348d2024798b6fceb9a3e33f491d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants