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

Q: can it work with scss preprocess? #2

Closed
Valexr opened this issue Aug 19, 2021 · 28 comments
Closed

Q: can it work with scss preprocess? #2

Valexr opened this issue Aug 19, 2021 · 28 comments

Comments

@Valexr
Copy link

Valexr commented Aug 19, 2021

<style lang="scss">
@winston0410
Copy link
Owner

I think so, but you have to place this preprocessor after scss preprocessor, as this one only handles vanilla CSS.

@Valexr
Copy link
Author

Valexr commented Aug 20, 2021

Ok🤓will try it

@winston0410
Copy link
Owner

@Valexr Do let me know if there is any bug!:)

@Valexr
Copy link
Author

Valexr commented Aug 20, 2021

Yep, I have a bug with <style lang=scss> with esbuild-svelte plugin:

Screenshot 2021-08-20 at 14 51 05

testing repo

@winston0410
Copy link
Owner

@Valexr thank you for the testing repo! I will use it and see how can I fix that.

@Valexr
Copy link
Author

Valexr commented Aug 21, 2021

But I'm haven't testings with other bundlers... like rollup or webpack

@winston0410
Copy link
Owner

@Valexr It will work if you use a wrapper like this: winston0410/svelte-glory@f8744a3

As explained here: https://www.npmjs.com/package/svelte-as-markup-preprocessor

Btw I would be great if you can help out making a benchmark repo:)

@Valexr
Copy link
Author

Valexr commented Aug 21, 2021

preprocess is not defined 🤷🏻‍♂️

@winston0410
Copy link
Owner

Sorry it should be this: winston0410/svelte-glory@4715e88

Good catch!

@Valexr
Copy link
Author

Valexr commented Aug 21, 2021

It's building now, but missing inherited class in element <h1 class>

@winston0410
Copy link
Owner

@Valexr good catch, let me check it again

@winston0410
Copy link
Owner

@Valexr It was the issue with descendant combinators. Fixed in 227a0bb

@Valexr
Copy link
Author

Valexr commented Aug 24, 2021

Sorry, but in 0.1.9 one more error

Screenshot 2021-08-24 at 06 45 31

🤷🏻‍♂️

@Valexr
Copy link
Author

Valexr commented Aug 24, 2021

v 0.2.0 still error

@winston0410
Copy link
Owner

I have just refactored to support more selectors, and I guess I will take a few more day to fix it and make it usable again.

@Valexr
Copy link
Author

Valexr commented Aug 25, 2021

It's ok🤓just trying help you with SASS preprocessing testing, if you need this exactly

@winston0410
Copy link
Owner

Yes please do! Any testing is helpful:)

@winston0410
Copy link
Owner

@Valexr I think I have fixed all previously mentioned issue in 0.2.2, maybe you can give it a try now.

winston0410/svelte-glory@a847cf9

@Valexr
Copy link
Author

Valexr commented Aug 25, 2021

Yep👍🏻working 👌🏻

@Valexr
Copy link
Author

Valexr commented Aug 25, 2021

But in more complicated project with CSS & SCSS together:

<style lang="scss" global>
  @import "base.scss"
</style>

// or

<style src="variables.css"></style>

I have a bug
Screenshot 2021-08-25 at 15 34 20

while don't understand with what...

@Valexr
Copy link
Author

Valexr commented Aug 25, 2021

Update testing repo with global attribute no bugs but broken styles

@winston0410
Copy link
Owner

@Valexr For the error message, the issue is in esbuild itself, which I guess it doesn't pass the log back from worker thread to the thread used in Node. I will look at the error again tomorrow.

@winston0410
Copy link
Owner

@Valexr seems like it is working now, can you give it a try?
https://github.com/winston0410/svelte-glory

Btw is there any documentation for using src in <style> in svelte? I cannot find it.

@Valexr
Copy link
Author

Valexr commented Aug 31, 2021

Yep, it's working, but add whitespaces

with glory

without

@winston0410
Copy link
Owner

@Valexr Can you find out what class is added/missing there between two version?

@Valexr
Copy link
Author

Valexr commented Sep 1, 2021

Wrong info about whitespases, sorry...
Missing @media query

Screenshot 2021-09-01 at 09 56 19

@winston0410
Copy link
Owner

Right it is media query, and I have fixed it this morning.Maybe you can give it a try again now? (install from github instead of npmm it is breaking a lot right so I guess I wont publish on npm untill bug free)

@Valexr
Copy link
Author

Valexr commented Sep 2, 2021

Ok. What true link from GitHub?

with this link same issue - missed @media-query:

"dependencies": {
    "glory-svelte-preprocess": "github:winston0410/glory-svelte-preprocess"
}

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