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

Implement the "safe" alignment variants #550

Open
nicoburns opened this issue Oct 4, 2023 · 0 comments
Open

Implement the "safe" alignment variants #550

nicoburns opened this issue Oct 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@nicoburns
Copy link
Collaborator

Objective

Enable alignment modes that have better behaviour when the contents of the node overflow their container.

Context

Overflow keyword values

The overflow property determines how it will display the contents of the grid when the content exceeds the grid’s boundary limits. So, when the contents are larger than the alignment container, it will result in overflow which might lead to data loss. To prevent this, we can use the safe value which tells browser to change alignment so that there is no data loss.

  • safe: The element will behave as though the alignment mode is start if it overflows the containing element.
  • unsafe: The element’s alignment value is respected, regardless of the size of the containing element which allows the element to overflow the containing element if its size exceeds the available space.

Source: https://css-tricks.com/almanac/properties/j/justify-self/#aa-overflow-keyword-values

We currently implement the "unsafe" variants which are the default in browsers if safe/unsafe is not specified.

Originally posted by @nicoburns in #549 (comment)

@nicoburns nicoburns added the enhancement New feature or request label Oct 4, 2023
This was referenced Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant