Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[css-align] Allowing fallback alignments without breaking shorthands #1002
Comments
fantasai
added css-align-3 Needs Group Input/Decision
labels
Feb 2, 2017
|
This sounds like the values are basically parallel; why not just use commas to separate the fallback from the normal? |
|
Resolution to defer to L4: https://lists.w3.org/Archives/Public/www-style/2017Apr/0027.html |
fantasai
added Needs Edits and removed Needs Group Input/Decision
labels
Apr 19, 2017
MatsPalmgren
commented
Apr 19, 2017
I think that would be very confusing because slash is already used in the CSS Grid shorthands ( place-content: space-between start / center; /* space-between b-axis with start fallback, center i-axis */
place-content: space-between / center; /* synonym to "space-between center" */ |
|
i agree that a slash would be better used as a separator for row-axis and column-axis values. It even makes the shorthand's syntax clearer, IMO |
fantasai
added a commit
that referenced
this issue
May 2, 2017
|
|
fantasai |
c38cac4
|
fantasai
added Closed Accepted by CSSWG Resolution css-align-4 and removed Needs Edits Closed Accepted by CSSWG Resolution css-align-3
labels
May 2, 2017
MatsPalmgren
referenced
this issue
May 16, 2017
Closed
[css-align] Rename `auto` to `legacy` for `justify-items` #1318
MatsPalmgren
commented
May 20, 2017
|
I don't think this syntax issue should be deferred to L4, because adopting the proposal to use It seems to me that If you don't want to resolve on an extended syntax here for L3, then I request that these shorthands be deferred wholesale to L4 to avoid creating a situation were the preferred syntax can't be introduced because it would break the web. |
|
No, I was suggesting that the slash separates the initial and the fallback, not the axes. So we'd have Then for the shorthand, (Syntax of border-radius is |
fantasai
added the
Agenda+ F2F
label
Jun 27, 2017
astearns
removed the
Agenda+ F2F
label
Aug 1, 2017
css-meeting-bot
commented
Aug 2, 2017
|
The CSS Working Group just discussed
The full IRC log of that discussion<fremy> Topic: Syntax for fallback alignment in the place-* shorthands<TabAtkins> GitHub: https://github.com/w3c/csswg-drafts/issues/1002 <fremy> TabAtkins: we would like to allow all combinations in the shorthand that are possible in the longhands <fremy> TabAtkins: but if we just allow spaces, this would be ambigous <fremy> TabAtkins: we need to have a separator to know which values are fallback for what <fremy> TabAtkins: usually this kind of separator is the slash "/" <fremy> TabAtkins: but if we decide to use a separator, should we do axis-1 / axis-2 or value/fallback value/fallback <fremy> TabAtkins: former is annoying because you always need the slash <fremy> TabAtkins: I believe the latter is better for that reason <Rossen> q? <fremy> fantasai: sounds it would make the longhand easier to read <fremy> fantasai: (the slash) <fantasai> s/sounds/ <fantasai> s/sounds// <fremy> TabAtkins: there would be a second proposal to make the longhand also have the slash <fantasai> s/second// <fremy> fantasai: The proposal is to do both, not just for shorthand <fantasai> https://github.com/w3c/csswg-drafts/issues/1002#issuecomment-311501471 <fantasai> align-content: space-between / center <fremy> TabAtkins: even align-content would use space-between / center <fantasai> lace-content: space-between / center <fremy> TabAtkins: with center as the fallback <fantasai> �place-content: space-evenly / start center <fremy> Rossen: I like it better than what we have right now <fantasai> align-content: space-evenly / start; justify-content: space-evenly / center <fantasai> (same as above) <TabAtkins> place-content: space-evenly space-between / center; <= different distribution, same fallback <fremy> rachelandrew: I think it makes sense <fremy> Rossen: anyone else? <fremy> Rossen: let's resolve then <fremy> Rossen: any objection to use the slash for fallbacks in all alignments? <fremy> RESOLVED: slash must be use to separate main value and fallback value in shorthand and longhands alignment properties |
fantasai commentedFeb 2, 2017
•
edited
When adding the
place-*shorthands, we realized that specifying a fallback alignment for the content distribution keywords (space-aroundetc.) resulted in parsing ambiguities. We debating using a slash in the shorthand, but decided not to because it would make 2-axis alignment syntax inconsistent with similar syntax elsewhere in CSS, e.g. forscroll-snap-alignorbackground-position.An alternate idea is to use the slash to separate the fallback from the initial. Imho this also helps make it clearer that we're declaring a fallback alignment, since slashes are used to indicate alternates in general typographic usage.
Examples:
(I think it's probably best to consider this for Level 4, leaving fallback keywords out for Level 3 so we can take Level 3 to CR asap.)