gorko
gorko copied to clipboard
Gorko refactored to support @use and @forward
I hope this is useful as sass moves to a module system. Please forgive the number of commits. It took some back and forth working this out.
Thank you for your work, I am in the same shoe, as I wanted to use this with my current project. Is there a way to merge this in the original repo? Or just download from your repo? I suppose you have the updated version.
Thanks, if you want to fork my repo its at - https://github.com/woodcox/gorko. I'm not planning to maintain it as I have moved on to a simple sass set up which leans into native css much more.
I also experimented with your repo for a few hours but decided to make the only needed sass/css classes with a few simple functions :) If your solution is public I would appreciate it if you can share it with me, because I think I can learn a lot from it. My current solution is like this:
$distances: (
0: 0,
6: 0.375rem,
12: 0.75rem,
18: 1.125rem,
24: 1.5rem,
30: 1.875rem,
36: 2.25rem,
42: 2.625rem,
48: 3rem
);
@each $key, $val in $distances {
$index: index($distances, $key $val);
.padding-#{$key} {
padding: $val;
}
}
You may wish to look at https://github.com/saneef/postcss-design-token-utils. It’s essentially gorko converted to a postcss plugin.