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

Border - separated borders override colors #2236

Closed
SuperHackerKev opened this issue Sep 12, 2023 · 6 comments
Closed

Border - separated borders override colors #2236

SuperHackerKev opened this issue Sep 12, 2023 · 6 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation Figma feature not suppored Blocked by Figma limitation - revisit known issue token type border composite token type

Comments

@SuperHackerKev
Copy link

Seperate border override each other
The bug results in wrong colors being applied to seperated borders on a rectangle

To Reproduce
Steps to reproduce the behavior:

  1. create 4 tokens for each side of a rectangle with different colors - but 0 width for all sides except one!
  2. apply each token to each side of the rectangle
  3. witness that the last token defines the color for the only visible border

Expected behavior
The only visible border should keep its defined color

Screenshots or Screencasts

border_trbl_bug

@six7
Copy link
Collaborator

six7 commented Sep 27, 2023

Thanks, agree this would make it easier to work with 🙏

@esthercheran esthercheran added the bug Something isn't working label Jan 8, 2024
@NuthanHyma
Copy link
Collaborator

Figma File
Test File

@SamIam4Hyma SamIam4Hyma added the token type border composite token type label Mar 20, 2024
@SamIam4Hyma
Copy link
Collaborator

This issue is partly due to Tokens Studio appears to be supporting independent colors for border, but under the hood, Figma doesn't support this yet, so the plugin is passing through the last color applied. We should look at this the next time we look at border under the hood, but it's a combo of known issue needing to be better documented based on the Figma limitation.

I will label as such and remember to add it to the new technical docs. @SuperHackerKev the workaround is to have the token with the value be applied last and make some notes in your token sets and component libraries until we get this fixed.

@SamIam4Hyma SamIam4Hyma added documentation Improvements or additions to documentation known issue Figma feature not suppored Blocked by Figma limitation - revisit labels Mar 21, 2024
@JAspeling
Copy link

JAspeling commented Apr 5, 2024

Is there a workaround for this in the meantime?

Edit: For now I'm creating a bottom-border manually with another rectable and the auto-layout. And then I style that rectangle as I would want the border for the different themes

@SamIam4Hyma
Copy link
Collaborator

@JAspeling I'm going to close this issue for now as I've added these notes to the new docs which should be live soon! Thank you so much for bringing this to our attention so we can help others out!

Feel free to email me a copy of your physical mailing address and I'd love to send you some Tokens Studio stickers in gratitude of your time and contribution to our docs.

sam@tokens.studio

p.s. For independent styling like you mentioned above, you can always "fake it" with "border" sub-elements like you mentioned. You could try a frame at 0px height or width with a stroke of its own at the width you need. Then add notes for your engineers on how you had to "hack" the mockup to get the idea across, but remind them to build properly. hehe

@SamIam4Hyma
Copy link
Collaborator

Added this as a known issue to the new technical docs, closing as this is expected behviour blocked by Figma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation Figma feature not suppored Blocked by Figma limitation - revisit known issue token type border composite token type
Projects
Status: ✅ Done
Development

No branches or pull requests

6 participants