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

[css-align][css-flex] 'baseline' computed value needs clarification on flexbox specs #1095

Closed
javifernandez opened this issue Mar 10, 2017 · 6 comments

Comments

@javifernandez
Copy link
Contributor

The alignment spec states the following about values:

https://drafts.csswg.org/css-align/#typedef-baseline-position

= [ first | last ]? baseline

The first and last values give a box a baseline alignment preference: either “first” or “last”, respectively, defaulting to “first”.
'baseline': Computes to 'first baseline', defined below

In the other hand, the Flexbox spec states the following:

https://www.w3.org/TR/css-flexbox-1/#align-items-property

Value: flex-start | flex-end | center | baseline | stretch
Computed value: specified value

Firefox nightly returns the following computed values:

align-items: baseline => baseline
align-items: first baseline => baseline
align-items: last baseline => last baseline

Is the current Firefox's behavior correct ?

In any case, shouldn't the Flexbox spec reflect the new baseline syntax and computed values ?

@javifernandez
Copy link
Contributor Author

Please, @tabatkins @fantasai could you take a look at this issue ? Not that it's specially urgent, but I m afraid it gets lost, since it's not even tagged yet. Thanks.

@fantasai
Copy link
Collaborator

fantasai commented Apr 7, 2017

yes, Firefox's behavior is correct. See https://drafts.csswg.org/css-align-3/#baseline-values particularly the second-to-last note.

Flexbox's definitions of these properties are limited to the subset of features that were defined when it hit CR, so it can't include the first/last keywords. Think of Flexbox's alignment chapter as being an earlier Level of Box Alignment. :)

Let me know if you think a spec fix is needed here.

@fantasai
Copy link
Collaborator

fantasai commented May 2, 2017

@javifernandez ?

@MatsPalmgren
Copy link

@fantasai FYI, the draft css-flexbox spec still defines these properties differently than css-align.
https://drafts.csswg.org/css-flexbox/#justify-content-property

That seems like a spec bug to me. I think 8.2/8.3/8.4 in the draft css-flexbox spec needs to be removed/merged into css-align. It's confusing for everyone to have definitions for these properties in two places. (It's fine if the TR still have them with the old syntax/values, because everyone knows that TR means it's likely already obsolete.)

@fantasai
Copy link
Collaborator

fantasai commented May 3, 2017

The ED is intended to be a temporary staging area for /TR; /TR is out-of-date mainly because it takes so long to get it updated. We're getting better at that now that W3C finally has tooling for pushing updates without involving handoffs among the editors and at least two members of W3C Staff, so differences between ED and /TR are really bugs in the process, and should be increasingly temporary.

I added a section to Module Interactions in Flexbox; there's already one in Align. And the Alignment section of Flexbox already says that it's will be superceded by Box Alignment. Not sure what else to do.

@fantasai
Copy link
Collaborator

fantasai commented May 3, 2017

Also wrt this issue, CSS values always serialize to their shortest representation (unless that representation is newer than the longer representation, but that's not the case here).

@fantasai fantasai closed this as completed May 3, 2017
@fantasai fantasai added this to the Published css-flexbox-1 2017-10-19 milestone Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants