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

Correct the dimension relative units in grid-rows/columns were assigned to #1640

Merged
merged 4 commits into from
Jan 23, 2023

Conversation

rodrigogiraoserrao
Copy link
Contributor

Fix #1406, both the original issue and the other bug that surfaced while investigating it.

  • Programmatic assignments to grid-rows/grid-columns would always be relative to width because the ScalarListProperty wasn't aware of its percent_unit.
  • Parsing grid-rows/grid-columns from CSS files would always be relative to height because the method StylesBuilder._process_grid_rows_or_columns had an if statement that always evaluated to False and always picked Unit.HEIGHT.

Without this information, grid-rows and grid-columns will have the same percent_unit for scalars that are relative and thus relative dimensions will be wrong.
Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice sleuthing on this one.

@rodrigogiraoserrao rodrigogiraoserrao merged commit 4baf4f4 into main Jan 23, 2023
@rodrigogiraoserrao rodrigogiraoserrao deleted the fix-1406 branch January 23, 2023 16:25
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

Successfully merging this pull request may close these issues.

Grid columns with multiple units resolves percent unit to wrong value
2 participants