Skip to content

Custom step labels #6

Description

@dnlzro

I'm wondering if there's any interest in having custom labels for the steps in a type or space scale. For example, Tailwind uses "base" to denote step 0, "lg" to denote step 1, etc. I'd be happy to submit a PR to make the labels customizable.

For example, we could add a new parameter to the calculateTypeScale and calculateSpaceScale like this:

labels: {
  positive: ["base", "lg", "xl"],
  negative: ["sm", "xs"],
}

In this case, steps that are greater than than "xl" would follow the pattern "<n - 1>xl", and steps that are smaller than "xs" would follow the pattern "<-1 * (n + 1)>xs".

We could also just hardcode some options instead (e.g. Tailwind style, Utopia style, numeric style, etc.).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions