You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In both Chrome and Firefox, the "small" item is centered in its parent grid, showing that place-self: unsafe center; is successfully parsed, but the "large" item is safely centered, violating the specified value.
@fantasai is putting together a set of tests for the alignment behavior right now showing this in detail (the testsuite only contains parsing tests, not behavior tests; parsing-only tests considered harmful).
Regardless of the testing situation, tho, the Align spec currently specifies that an unspecified safety value, like place-self: center;, should use the "smart" alignment which attempts to do unsafe alignment if it's safe to do so; if UAs can't do the smart thing, they must fall back to unsafe behavior, following the example of Flexbox. However, we see here that browsers interoperably instead only implement safe alignment for Grid.
It's thus pretty likely that we have a major compat situation at this point, and have to specify that the default alignment is layout-mode-specific, so Flexbox can default to unsafe while Grid defaults to safe. (We're assuming that the compat impact of fixing browsers to actually honor a specified unsafe keyword is acceptable, or else we're in a real terrible situation.)
So, any thoughts on this matter? If nobody has arguments against, we're going to specify that the default alignment is layout-specific and let Flexbox default to "unsafe" while Grid defaults to "safe". (Unsure which side Block should land on.)
The text was updated successfully, but these errors were encountered:
I think the test case that you used is not correct to show an issue related to the use of the 'unsafe' keyword in the overflow overflow alignment. The grid uses auto-sized tracks, so the grid area will get the same size as larger item (80px). So the center alignment wont cause any overflow, hence the 'unsafe' keyword is useless.
It's possible to apply the 'unsafe' keyword to the Content Alignment, using the place-content shorthand and you'll see in the same test case how the 'unsafe' has the expected behavior.
It is still the case that this behavior isn't tested, so the WPTs from @fantasai (once she applies the fix) will still be useful, but yeah, looks like browsers are good for this now.
Consider this testcase:
In both Chrome and Firefox, the "small" item is centered in its parent grid, showing that
place-self: unsafe center;
is successfully parsed, but the "large" item is safely centered, violating the specified value.@fantasai is putting together a set of tests for the alignment behavior right now showing this in detail (the testsuite only contains parsing tests, not behavior tests; parsing-only tests considered harmful).
Regardless of the testing situation, tho, the Align spec currently specifies that an unspecified safety value, like
place-self: center;
, should use the "smart" alignment which attempts to do unsafe alignment if it's safe to do so; if UAs can't do the smart thing, they must fall back to unsafe behavior, following the example of Flexbox. However, we see here that browsers interoperably instead only implement safe alignment for Grid.It's thus pretty likely that we have a major compat situation at this point, and have to specify that the default alignment is layout-mode-specific, so Flexbox can default to unsafe while Grid defaults to safe. (We're assuming that the compat impact of fixing browsers to actually honor a specified
unsafe
keyword is acceptable, or else we're in a real terrible situation.)So, any thoughts on this matter? If nobody has arguments against, we're going to specify that the default alignment is layout-specific and let Flexbox default to "unsafe" while Grid defaults to "safe". (Unsure which side Block should land on.)
The text was updated successfully, but these errors were encountered: