-
Notifications
You must be signed in to change notification settings - Fork 38
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
Semantic Border-radius tokens #2287
Comments
Great work @Febakke ! 🌟
And, so we need this many variations? I guess Input, Checkbox, Card, Button might have different needs, but then again - Mattilsynet will for instance want to have This is indeed hard to answer, but I think it is nice to discuss as it touches the core of what Designsystemet should be, and it affects complexity and therefore both amount of work needed to create, maintain, and learning curve for consumers :) |
The max is set into the token so it wont go over no matter what you put as base radius. I agree I think maybe a healthy next step is to define what we actually need. Example:
@Thuneer What grades fo border radius am I missing? |
The issue is not to please all needs, but to handle the expected behavior in the tokens instead of handling max border radius on components. The reason why we want max border radius is because we want users to be able to set a base border radius and change all components based on that. Its a simple way of changing the look of components to fit their design. And I want to handle this is tokens because
That said... |
This will affect both tokens build and create scripts in the CLI. |
Meeting with @mimarz Meeting notes
Design changes
Changes in code
|
Example from radix: https://www.radix-ui.com/themes/playground |
Meeting with @mrosvik We tested out the new border-radius tokens on our components and started documenting how they could be used.
To do
Edit |
UpdateI have tried to illustrate how this will work in a Figma prototype. Just change the border radius in the top left corner and see how it changes the components. Smaller scaleWe will use the scale in my last comment. This will only have 3 steps that have max values. These tokens have specific use cases. We also renamed the largest token More controllThe max values used by It works by multiplying the scale token on a number set in the token. For example: NB: We are still working on what the numbers we will multiply the scale token are. "My design does not work with this border-radius system"Well, i am sorry to hear that. But all is not lost. Its a little more work, but you can manually edit the border-radius values to whatever you need. And if you have a special case. For example everything except button has |
Tasks
We want better semantic border-radius tokens. Example: checkbox should always be square
Started doing some research on how we can solve this is Figma. Token Studio supports a set of math functions their might be a way to set max value to a token. This would help us in the short term. I have reach out to the Token Studio Slack for suggestions.
If we develop our own plug in, the logic to handle this must be solved in that plug in.
Success
We are able to use a min/max function in Token Studio and can create tokens with a max border radius value.
This means we can set a token on border radius for checkboxes that will have their square shape even though you set the base value very high.
Heres an illustration of what we want to create:
Theming support
primitives/globals
and intothemes/theme
You can now change between themes and have different border radius.But I think we can move it intosemantic/style
Less variables to think about.sm
-md
-lg
or should the behavior be built into the name. Something likesm-up-to-4
But its not pretty 😄3xl
(ceiling at 32)9999
and do we need a static token that is always9999
Semantic names
We want to give you a size and what max border-radius you will get from this token. So the suggested token name will be
lg-12
If your base border-radius goes beyond 12, this token will be 12.Ful list of suggested tokens
As you can see there is also a static full token. This will alway give you a circle. Made for components that should always have a circular form.
Tasks
If yes
The text was updated successfully, but these errors were encountered: