Closed Bug 1830771 Opened 2 years ago Closed 2 days ago

`vertical-align` should become a shorthand

Categories

(Core :: Layout, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: dshin, Assigned: sajidanwar)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file, 4 obsolete files)

As specified here
Should be a shorthand of baseline-source, alignment-baseline, and baseline-shift.
Currently a longhand with the old definition.

Severity: -- → S3
Depends on: 1809568

Could I be made assignee of this bug? I've been making progress toward patches that implement the vertical-align shorthand along with the implementations of the baseline-shift and alignment-baseline properties. I'm working through test failures and logic gaps but I think I can get there (though with some clarifications, at least one I'm planning on opening with the CSS Working Group soon).

I think this bug can also be marked as dependent on bug 308338 (baseline-shift) and bug 1403440 (alignment-baseline), and I'd like to take those too as part of this.

Flags: needinfo?(dholbert)

Sure, thanks!

(And if you file CSSWG issues for clarification, please share links here.)

Assignee: nobody → sajidanwar94
Depends on: 308338, 1403440
Flags: needinfo?(dholbert)
Summary: `vertical-alignment` should become a shorthand → `vertical-align` should become a shorthand

Thank you! I've filed a CSSWG issue about the new vertical-align shorthand and the existing CSS Text 3 text shaping specification: https://github.com/w3c/csswg-drafts/issues/13277

The CSS Text specification says that text shaping should be broken if
the vertical-align is not baseline. This WPT treated a 0 value as
separate from baseline, but the CSS 2 specification makes clear that a
value of 0 is equivalent to baseline, so text shaping shouldn't be
broken in this case.

Furthermore, the CSS Inline Layout Model Level 3 makes it clear that not
breaking is the correct behavior. With the introduction of the shorthand
syntax, vertical-align: 0 is equivalent to the initial value of
baseline, since 0 is the initial value of baseline-shift. So I've
modified this test to use a non-initial baseline-shift length to test
the shaping behavior.

Related clarification issue filed to the CSS Working Group:
https://github.com/w3c/csswg-drafts/issues/13277

Replaces the vertical-align longhand with the shorthand version and
the corresponding alignment-baseline and baseline-shift longhands
(the baseline-source property was already implemented). Some notes
about this change:

  • The CSS Inline Layout Module Level 3 specification introduced new
    values to alignment-baseline and baseline-shift that were not
    available in the original vertical-align longhand. This change
    only implements the original keywords; the new values will be used
    in a future patch.

  • The SVG layout still ignores the vertical-align (and now the
    corresponding longhands) in favor of the dominant-baseline. This
    will also be addressed in a future patch.

Comment on attachment 9535306 [details]
Bug 1830771 - Update WPT to move bottom/center/top from alignment-baseline to baseline-shift per specification. r=#layout-reviewers

Revision D277723 was moved to bug 308338. Setting attachment 9535306 [details] to obsolete.

Attachment #9535306 - Attachment is obsolete: true
Attachment #9535305 - Attachment is obsolete: true

Comment on attachment 9535359 [details]
Bug 1830771 - Decouple table cell alignment enum from CSS vertical-align enum. r=#layout-reviewers

Revision D277747 was moved to bug 2008335. Setting attachment 9535359 [details] to obsolete.

Attachment #9535359 - Attachment is obsolete: true

Comment on attachment 9535307 [details]
Bug 1830771 - Fix boundary shaping WPT to properly test non-initial baseline-shift values. r=#layout-reviewers

Revision D277724 was moved to bug 2008335. Setting attachment 9535307 [details] to obsolete.

Attachment #9535307 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fd791116add2 https://hg.mozilla.org/integration/autoland/rev/ccb3dc3feb7c Convert vertical-align into a shorthand property. r=layout-reviewers,firefox-style-system-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/57200 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 2 days ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: css-inline-3
No longer depends on: 308338, 1403440
See Also: → 308338, 1403440
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: