[go: up one dir, main page]

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

[ds] restrict fluid font-sizes to theme tokens #353

Open
jjenzz opened this issue Sep 26, 2024 · 0 comments
Open

[ds] restrict fluid font-sizes to theme tokens #353

jjenzz opened this issue Sep 26, 2024 · 0 comments

Comments

@jjenzz
Copy link
Collaborator
jjenzz commented Sep 26, 2024

atm we can do this:

css({
  '--font-size': 'var(--fluid-text-size_min-max)',
  '--fluid-text-size-min': 2,
  '--fluid-text-size-max': 10,
});

but this defeats the point of the constrained text sizes available in theme when applying non-fluid font sizes:

css({
  '--font-size': 'var(--text-size_xs)', // we can't pass `2` or `10` here, only a token 
});

this ticket is to make the api more consistent when applying fluid/non-fluid font sizes.

css({
  '--font-size': 'var(--fluid-text-size-clamp_min-max)',
  '--fluid-text-size-min': 'var(--fluid-text-size_xs)',
  '--fluid-text-size-max': 'var(--fluid-text-size_lg)',
});

this will be a breaking change because fluid breakpoint tokens need to be suffixed with clamp. this allows fluid-text-size key to be numeric, unitless values that match the text-size tokens.

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

1 participant