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

Add space-evenly property value for justify-content and align-content #585

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Add space-evenly property value for justify-content and align-content #585

merged 1 commit into from
Jan 29, 2024

Conversation

TriangulumDesire
Copy link
Contributor

This is a small change, adding support for space-evenly to the flex-box properties justify-content and align-content. It is similar to space-around, but the gaps between the items and the container edges are equal to the gaps between the items (instead of the gaps between the edges and items being half the size of the space of the gaps between items).

I couldn't find any unit tests that explicitly check all of the flex-box spacings, but I did test it visually, and it works nicely.

space-around:
space-around

space-evenly:
space-evenly

@mikke89 mikke89 added enhancement New feature or request layout Layout engine issues and enhancements labels Jan 29, 2024
@mikke89 mikke89 merged commit 6b56950 into mikke89:master Jan 29, 2024
18 checks passed
@mikke89
Copy link
Owner

mikke89 commented Jan 29, 2024

Nice one, thank you!

It would be very helpful if you could add these values to the documentation as well.

We normally use the visual tests to test things like this. I ran this PR through all the flex tests, including the W3C ones, and it didn't really make any difference. So at least we didn't break anything but it would be nice with better test coverage.

@TriangulumDesire TriangulumDesire deleted the add-space-evenly-flexbox-value branch January 30, 2024 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request layout Layout engine issues and enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants