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

using the gap controls for the first time fails, even inside a div #5981

Closed
maltenuhn opened this issue Jun 18, 2024 · 1 comment
Closed
Labels
Perceived Bug Something that feels broken or like a problem

Comments

@maltenuhn
Copy link
Member

maltenuhn commented Jun 18, 2024

Problem

  1. The gap controls don't start from the currenltly observed gap, should
  2. if there is no gap, the controls don't update the canvas correctly

Try it by selecting this inner div in the sample project, and using the gap control here.

NB it is already a known issue that the starting value for the gap isn't the actual value (in this case stemming from a tailwind class). But in addition to that, the first interaction with the gap control should - by setting style.gap - immediately apply, since style is more specific than className. However, it does not.

This appears to also be an issue for padding.
https://github.com/orgs/concrete-utopia/projects/6/views/1?pane=issue&itemId=67733608

@maltenuhn maltenuhn added the Perceived Bug Something that feels broken or like a problem label Jun 18, 2024
@bkrmendy bkrmendy self-assigned this Jun 19, 2024
@bkrmendy bkrmendy linked a pull request Jun 19, 2024 that will close this issue
2 tasks
@bkrmendy bkrmendy removed a link to a pull request Jul 1, 2024
2 tasks
@bkrmendy bkrmendy removed their assignment Jul 1, 2024
@bkrmendy
Copy link
Contributor

bkrmendy commented Jul 3, 2024

For posterity: I tried fixing this, the core problem is that the units of the padding value can only be read from the style prop or the tailwind class, because specialSizeMeasurements only has the size in px. Parsing out the actual values from the tailwind classes is far from a trivial job, so the fix for this should be rolled into the wider Tailwind support project.

@bkrmendy bkrmendy closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Perceived Bug Something that feels broken or like a problem
Projects
None yet
Development

No branches or pull requests

3 participants