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

Use SASS as a template engine for CSS/SCSS files #408

Closed
jonsage opened this issue Feb 11, 2019 · 7 comments
Closed

Use SASS as a template engine for CSS/SCSS files #408

jonsage opened this issue Feb 11, 2019 · 7 comments
Labels
enhancement needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.

Comments

@jonsage
Copy link

jonsage commented Feb 11, 2019

It would be good to be able to optionally use node-sass as the template renderer for .css/scss files...

It seems to similar fit the same architectural pattern as any other template engine, albeit for a different type of file...

What would be the difficulty in supporting this as an option?

Thanks :)

@chrisdmacrae
Copy link
Contributor

@zachleat what's the opportunity on opening a plugin API for engines?

If the engine API could be partially standardized, I think this could easily be done through plugins, allowing us to add less, sass, and more support.

@chrisdmacrae
Copy link
Contributor

I see this API binding a node module to a set of file extensions. This module would basically tell eleventy how to:

  • load the file
  • pass data to the file
  • render the file

@zachleat
Copy link
Member

This is exactly the thing proposed by #117. After this API becomes available, we can defer this to plugins (some first party, some third party).

@zachleat zachleat added the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label Mar 8, 2019
@zachleat
Copy link
Member

zachleat commented Mar 8, 2019

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

View the enhancement backlog here. Don’t forget to upvote the top comment with 👍!

@zachleat zachleat closed this as completed Mar 8, 2019
@djmtype
Copy link

djmtype commented Aug 8, 2019

👍
Any site, large or small, needs sass sourcemaps.

@SimonEast
Copy link

It's been nearly 2 years since a comment on this thread, but just noting that if this does go ahead, be aware that node-sass is deprecated (and I could never get it to work on Windows, anyway). sass (aka "Dart SASS") is the version to use now and is pure Javascript rather than Python.

In the meantime, for those looking, I found eleventy-plugin-sass to be unusable (it uses the deprecated node-sass mentioned above), but this guide was helpful in getting SASS up and running. Would be nice to see that bundled into a clean plugin, but at least I understand what it's doing.

@einomi
Copy link

einomi commented May 15, 2021

Hey @SimonEast, you can check out my 11ty starter that features Gulp and Dart SASS https://github.com/frontenso/frontenso-11ty-starter

@zachleat zachleat changed the title Use SASS (node-sass) as a template engine for CSS/SCSS files Use SASS as a template engine for CSS/SCSS files Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.
Projects
None yet
Development

No branches or pull requests

6 participants