-
Notifications
You must be signed in to change notification settings - Fork 711
[css-inline-3] 'vertical-align: middle' on table cells #5234
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
Labels
Milestone
Comments
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-inline-3] 'vertical-align: middle' on table cells<dael> github: https://github.com//issues/5234 <dael> fantasai: has top keyword and bottom keyword which are special b/c don't work off baseline. THey shift based on total linebox size. <dael> fantasai: Also has middle which is x-middle baseline and aligns to x-middle of parent. Same as alphabetic <dael> fantasai: We also have vertical-align top, middle, bottom all behave completely unrelated to inline layout and they are basically start, center and end. By splitting to longhand it means we have to map to magic. Middle is part of alignment-baseline and top and bottom are line relative <dael> fantasai: Can spec vertical-align top middle on a table cell. What does that mean? <dael> fantasai: I prefer top and bottom take precedence <dbaron> sounds fine to me <dael> AmeliaBR: Did debate recently about which longhand top and bottom go to. One solution is move them into other longhand to solve this one issue <dael> AmeliaBR: It would meant that alignment-baseline controls table alignment b/c that makes no less sense than anything else <dael> florian: THink we had reasons to put in longhand we picked <dael> fantasai: B/c not possible to combine top or bottom with shift. Can in theory with everything else <dael> fantasai: I don't have a strong feeling about this. Don't know if anyone else does <dael> florian: To extent we keep in longhand your proposal seems reasonable. Should they be moved is separate <dael> fantasai: Right, we can re-open that issue and tag for discussion <dael> fantasai: This top and bottom take precedence over middle <florian> s/keep in longhand/keep in this longhand/ <dael> Rossen_: Other comments or objections? <fantasai> s/we can/anyone who wants can/ <dael> RESOLVED: top and bottom take precedence over middle |
fantasai
added a commit
that referenced
this issue
Aug 13, 2020
fantasai
added a commit
that referenced
this issue
Aug 13, 2020
…top and middle are specified together. #5234
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So...
vertical-align: middle
has special behavior on table cells: it causesalign-content: normal
to be treated ascenter
(similar to how thetop
andbottom
values triggerstart
andend
, respectively).Splitting 'vertical-align' into longhands means we have to map the behavior over from the longhands instead. Unfortunately since
middle
is an actual baseline (halfway between the alphabetic baseline and the ex-height) it's inalignment-baseline
whereastop
andbottom
are line-relative values that shift content but don't represent an actual baseline, and are therefore inbaseline-shift
. Which means it's possible to specifyalignment-baseline: middle; baseline-shift: top
. Need to define whether that's treated asvertical-align: top
orvertical-align: middle
. My suggestion is thattop
andbottom
take precedence, because that's what happens in inline layout as well (alignment baselines are ignored for alignment within the parent in favor of top/bottom alignment within the line box).The text was updated successfully, but these errors were encountered: