Sass with includes #2843
Replies: 3 comments 2 replies
-
Stephanie Eckles did a thing that lets you keep the imported files inside of src and skips scss files that start with an underscore. She wrote about it. It might help. I have tried the plugin she built and it works but seems to have a strange side effect (not really sure if the issue is the plugin or 11ty). https://11ty.rocks/posts/process-css-with-lightningcss/ Here's a link to the issue I posted about the plugin. Not sure you'll have the same issue or not once you put the imported files into src. |
Beta Was this translation helpful? Give feedback.
-
So, what worked for me was this plugin: https://github.com/kentaroi/eleventy-sass. I only had one issue. One file in the includes included another and I had to add |
Beta Was this translation helpful? Give feedback.
-
https://www.11ty.dev/docs/languages/custom/#using-inputpath also has some tips on using Sass+ |
Beta Was this translation helpful? Give feedback.
-
I'm new to Sass, and trying to make use of a Jekyll theme that makes use of it. My site's source directory is src. I'm using the addTemplateFormat example here, https://www.11ty.dev/docs/languages/custom/#example-add-sass-support-to-eleventy, to enable support for .scss. The theme used a
_sass
directory that I have copied as is to the root of my project, so it's under /, whereas my site input is specifically /src.In /src/assets/css/style.scss, I've got a few short lines:
When I run my site, it "compiles" the scss but ignores the import.
So I guess what I'm asking is... how do I use a .scss file that needs to import a bunch of stuff such that I can keep those resources in their own folder, outside of /src (I don't want Eleventy to try to compile them twice).
Beta Was this translation helpful? Give feedback.
All reactions