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

Allow manually defining scale steps instead of using ratios #5

Open
diondiondion opened this issue Sep 11, 2022 · 3 comments
Open

Allow manually defining scale steps instead of using ratios #5

diondiondion opened this issue Sep 11, 2022 · 3 comments

Comments

@diondiondion
Copy link

I'd much prefer to be able to define the individual steps/sizes of the scale manually instead of having it generated based on a modular scale, which is something I simply don't believe in. (A part of my soul dies every time a designer talks about the golden ratio and visual harmony) – but more importantly, I've had negative experiences with rounding issues that were caused by using sizes that aren't rounded to whole pixels.

@kristoferjoseph
Copy link
Contributor

What would this look like?
How would you like to author these scale steps?

@diondiondion
Copy link
Author

Hi, since the base is set in pixels, defining the scale in pixels would make sense to me as well.

I was originally thinking of a simple array of sizes:

scale: [2, 4, 8, 14, 18, 22, 26, 32]

But given the bipolar nature of the scale, an object would probably make more sense, e.g.

scale: {
  '-5': 2,
  '-4': 4,
  '-3': 8,
   ...
   0: 18,
   1: 22,
   ...
}

Then again, does it really make sense for the scale to be bipolar when it's also used for spacing? It means that for smaller values, you basically have to go "up" negative numbers to increase spacing. It feels a bit weird, and I'd probably opt for separate scales for type and spacing, but it's just a first impression.

@kristoferjoseph
Copy link
Contributor

kristoferjoseph commented Apr 11, 2023

@diondiondion Looks like we will be adding imperative scales soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants