Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

SCSS Modules #6

Closed
MattMcAdams opened this issue Nov 25, 2019 · 2 comments
Closed

SCSS Modules #6

MattMcAdams opened this issue Nov 25, 2019 · 2 comments
Labels
[status] complete This has been resolved

Comments

@MattMcAdams
Copy link
Owner

MattMcAdams commented Nov 25, 2019

As a future state item, I'd like this project to use the new SCSS @ use and @ forward directives for several reasons.

  1. I'd rather not pass bourbon along with my package - I'd like to give people the option to use it themselves.
  2. This will allow for easier / more consistent name spacing that doesn't have to be hard coded into the functions, mixins, and variables.
  3. @ include will eventually be depreciated. Even though this is years off, I'd like to stay ahead of the curve.

Of course, One of the huge problems with moving in this direction is that libsass doesn't yet have support for SCSS modules, which means node-sass doesn't support it either. I'm not keen on requiring users to compile with dart-sass if they don't want to.

VS Code also doesn't support this change to the Sass grammar, though I believe this update is coming soon.

It may be difficult if not impossible to perform unit tests with True after this change is made because of the change in object scope. I'll need to play around with this when the time comes.

@MattMcAdams
Copy link
Owner Author

MattMcAdams commented Dec 5, 2019

Updates

  • VS Code has an update to the Sass grammar incoming December 2019, see issue 81943 on the VS code repo.
  • Track progress with LibSass module support, see issue 2807 on the libsass repo

Future notes:

Add this badge to readme when this change takes place:
https://img.shields.io/badge/dart--sass-1.23.0-blue

@MattMcAdams MattMcAdams added the [status] on hold This is planned, but is currently on the backburner label Dec 5, 2019
@MattMcAdams MattMcAdams added [status] complete This has been resolved and removed [status] on hold This is planned, but is currently on the backburner labels Dec 19, 2019
@MattMcAdams
Copy link
Owner Author

MattMcAdams commented Dec 19, 2019

VS Code has released an update to understand the new Sass grammar, so that's one down. I've moved much of the development to a new "modules" feature branch and am working on converting the project to support @ use and @ forward.

One of the problems I found with this was that Jest doesn't seem to work with sass/dart-sass. I've changed the tests to run with Mocha which has fixed the problem, and the error reporting is much better too!

In the new modules system, I've removed the dependency on bourbon and built several new functions to make the typography system more flexible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[status] complete This has been resolved
Projects
None yet
Development

No branches or pull requests

1 participant