[BUG?] Client-side SASS compilation does not work

This topic contains 10 replies, has 2 voices, and was last updated by  Sebastian 2 months, 1 week ago.

Author Posts

ddenev

Hi Sebastian,

Installed the latest 5.8.1.7 version and when set to do a client-side compilation of my SASS, the resulting CSS is not compiled but contains SASS code (checked with Dev tools).

When I change to server-side compilation, everything is back to normal.

Cleared caches, regenerated all CSS files (deleted and regenerated from Preferences) => no go.
There are no errors in the JS console.

Tested with both Chrome and Firefox.

Am I doing something wrong?

I could send you my active-styles.css and active-styles.scss files if you want (couldn’t find how to attach files to this post).


Sebastian

Hey,

Sorry for the trouble. The most useful thing would be for you to send me an export of your settings: Packs > Export > download as zip file. We don’t currently have an attach facility, but perhaps you could email it to support [at] this domain?

What you describe can happen when there is some invalid Sass, but then I would expect an error when you enable server-side Sass. I should be able to figure this out once I’ve looked at your settings.

Cheers,
Sebastian


ddenev

Hi,

I was just preparing the files to send you and noticed (thanks to your remark about invalid SASS) that I have an @import statement on top of my global SCSS:
@import '../plugins/dde-custom-functionality/assets/scss/poly-fluid-sizing';

This is relative to the wp-content/micro-themes directory.

Could this be the problem? If yes, then how should I import my file properly so that it works with client-side compilation?


Sebastian

Imports should work fine just as they do with Server side Sass. Although I will double check the ../ syntax is properly supported.

Could you try temporarily removing the import to see if that fixes things. You may also need to use the keyboard shortcut Ctrl + Alt + P to force a full Sass compile.

Cheers,
Sebastian


ddenev

Yes!

Replacing the import with the actual code from the imported file resolved the problem.

Thanks, Sebastian!

So I guess it must be the import then 🙂


Sebastian

As I suspected I think it might be the ../ path issue that needs fixing. For now, you could move the Sass import to:

wp-content/micro-themes/scss/poly-fluid-sizing

While I work on a fix for this.

Cheers,
Sebastian


ddenev

That’s good to know, thank you!

I hope this directory is not going to be deleted when rebuilding the generated files from within MT, right?


ddenev

Checked, it’s not 🙂


Sebastian

Hey Drago,

Supporting imports outside of the /micro-themes directory is a bit tricky with client-side Sass. I could certainly add support for this. But just wanted to check this is something you would use, now you know you can safely upload Sass libraries to the /micro-themes directory?

Cheers,
Sebastian


ddenev

Hi Sebastian,

Thanks for your feedback!

The main reason I prefer the SASS libs outside of /micro-themes is because I prefer to keep all my customization assets grouped together. For example I use a plugin – i.e. I have wp-content/plugin/my-plugin-name/assets and there I have all my additional CSS, JavaScript, images – therefore I would also prefer to put my SCSS there as well.

Putting the SCSS libraries in /micro-themes works for me as well. If it too much trouble to make it work outside – then do not bother. After all, it’s Microthemer that provides the SASS functionality 🙂

Best regards
Drago


Sebastian

OK, thanks for being flexible Drago. As I’m thoroughly immersed in CSS grid stuff right now I will hold off until the beta is ready, or someone else reports an issue with this.

Cheers!
Sebastian

You must login or register to reply to this topic.