gorko icon indicating copy to clipboard operation
gorko copied to clipboard

Gorko refactored to support @use and @forward

Open woodcox opened this issue 2 years ago • 4 comments

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.

woodcox avatar Oct 04 '22 20:10 woodcox

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.

KreativeLabs avatar Apr 08 '24 19:04 KreativeLabs

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.

woodcox avatar Apr 10 '24 06:04 woodcox

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;
	}
}

KreativeLabs avatar Apr 10 '24 07:04 KreativeLabs

You may wish to look at https://github.com/saneef/postcss-design-token-utils. It’s essentially gorko converted to a postcss plugin.

woodcox avatar Apr 19 '24 03:04 woodcox