- This topic has 10 replies, 2 voices, and was last updated 3 years, 9 months ago by
Sebastian.
Author | Posts |
---|---|
ddenev
September 5, 2019 at 9:17 am
|
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. 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
September 5, 2019 at 9:47 am
|
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, |
ddenev
September 5, 2019 at 10:59 am
|
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: This is relative to the Could this be the problem? If yes, then how should I import my file properly so that it works with client-side compilation? |
Sebastian
September 5, 2019 at 11:25 am
|
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, |
ddenev
September 5, 2019 at 11:33 am
|
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
September 5, 2019 at 11:36 am
|
As I suspected I think it might be the ../ path issue that needs fixing. For now, you could move the Sass import to:
While I work on a fix for this. Cheers, |
ddenev
September 5, 2019 at 11:39 am
|
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
September 5, 2019 at 11:44 am
|
Checked, it’s not 🙂 |
Sebastian
September 8, 2019 at 9:30 am
|
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, |
ddenev
September 8, 2019 at 10:05 am
|
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 |
Sebastian
September 9, 2019 at 8:19 am
|
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! |