Skip to content

[css-align] Serialization of the alignment properties. #2229

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

Closed
emilio opened this issue Jan 26, 2018 · 8 comments
Closed

[css-align] Serialization of the alignment properties. #2229

emilio opened this issue Jan 26, 2018 · 8 comments

Comments

@emilio
Copy link
Collaborator

emilio commented Jan 26, 2018

Should properties serialize the default values? Right now Blink and WebKit do so, which I think it's a bug.

In particular:

align-items: unsafe start;

Serializes in Blink as unsafe start, and only start in FF. I think the computed value should serialize to the shortest form possible.

This is annoying because it causes a lot of WPT failures on Gecko.

@emilio
Copy link
Collaborator Author

emilio commented Jan 26, 2018

cc @javifernandez

@emilio
Copy link
Collaborator Author

emilio commented Jan 26, 2018

There's a similar issue with first baseline, where FF only serializes to baseline.

@emilio
Copy link
Collaborator Author

emilio commented Jan 26, 2018

Also cc @MatsPalmgren, who also had an opinion on this IIRC.

@javifernandez
Copy link
Contributor

Umm, I understand your point about first baseline and I'm working now on matching FF on this regard. I haven't considered the case of tough. Is it the same case ? cc @fantasai to gather more opinions.

I think this is not the only CSSOM related issue we have, and I'm not sure we have a clear agreement about all these issues (see #1041 or #1033 for example) . I wouldn't mind to work on them as soon as we reach an agreement.

@javifernandez
Copy link
Contributor

Some other examples are #418 #878 #1004

@MatsPalmgren
Copy link

CSS values should always be serialized to their shortest form. (It's a bug in the CSSOM spec that it no longer explicitly spells that out.) Regarding first baseline specifically, it's explicitly specified in CSS Box Alignment, which says:

Note: Because they are equivalent, and 'baseline' is shorter, the CSSOM
serializes 'first baseline' as 'baseline'.

@fantasai
Copy link
Collaborator

What @MatsPalmgren said. Closing in favor of #1564, please re-open if there's some other consideration specific to css-align.

@MatsPalmgren
Copy link

It's worth noting though that unsafe isn't the default value in UAs that implements the behavior described under "(no value specified)".
In an UA that implements that behavior, align-items: unsafe start; should in fact serialize to align-items: unsafe start; (IIUC).

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