-
Notifications
You must be signed in to change notification settings - Fork 641
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-3] Baselines need to be defined on fieldsets. #7656
Comments
The difference between the top box and the bottom box is the markup, " Per https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend the placement of the
As for what which baseline to use, I think there are 3 options:
I think option (2) seems most useful, which I believe is what Chromium does. |
The CSS Working Group just discussed
The full IRC log of that discussion<astearns> topic: [css-align-3] Baselines need to be defined on fieldsets.<astearns> github: https://github.com//issues/7656 <emilio> ScribeNick: emilio <emilio> iank_: fieldsets need their baseline defined <emilio> ... they're special, have a <legend> on the border area <emilio> ... and their contents are wrap in a box with arbitrary display type <iank_> https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=10714 <emilio> iank_: implementations do wild things <emilio> ... dgrogan has screenshots of what browsers do today <emilio> ... my preference is to ignore the legend <emilio> ... that's Chromium's behavior <emilio> fantasai: I'd like to argue for Safari's behavior <emilio> ... first baseline from legend, last from content <emilio> Rossen_: why is that more sensible? <emilio> fantasai: legend is the first bit of text that you see <emilio> ... seems reasonable to align to it <emilio> ... that should def. work <fremy> +1 for aligning fieldsets with each other based on the legend <emilio> ... not sure what the last baseline to be, but taking the last baseline of the content of the fieldset makes sense to me <emilio> iank_: I think I disagree, <legend> is like table captions <emilio> ... they have smaller font-size, they're not the main content of the fieldset <emilio> ... first baseline should be actual content, that makes more sense to me <emilio> fantasai: would be great if web designers would weigh in on this <emilio> Rossen_: one potential use case might be aligning multiple fieldsets <emilio> iank_: aligning to non-fieldset content is more common I think <emilio> dbaron: I think I lean towards agreeing with iank_ <Rossen_> ack dbaron <emilio> ... not that uncommon for fieldsets to lack a <legend> <miriam> +1 Ian and David <emilio> ... if we wanted to align to legend we'd need to define what happens when there's no legend <emilio> +1 <tantek> +1 <heycam> q+ <emilio> ... my sense is that it's common not to have one <Rossen_> ack heycam <emilio> iank_: if you're aligning fieldsets with and without legends it'd be weird <emilio> heycam: agree with iank_ as well, legend is ancillary content like captions <emilio> ... fieldset legend could also have multiple lines of text as well <emeyer> q+ <Rossen_> ack emeyer <emilio> emeyer: I'm looking at live dom viewer on irc <emilio> ... I accept the argument that aligning to the legend is a bit dangerous <emilio> ... I have the feeling that many fieldsets don't have legend <emilio> ... but I do see situations for all three kinds of alignment. legend/first/last content <emilio> ... if I had to pick one I'd choose first line of contents <emilio> ... but I see use cases for the others <emilio> ... there's cases where I might want to align to others <emilio> ... I think both patterns would be common <emilio> fantasai: when you want first line to align, is there case where the legends don't align? <emilio> q+ <zcorpan> q+ <emilio> emeyer: I can't think of a reason, I'd want the legends to align with each other <emilio> ... sometimes I want text outside to align with the legend <emilio> iank_: if you want to align legends using top-alignment would work unless there's non-fieldset content <emilio> emeyer: I probably would want the text outside to align with the first line of content rather than the legend <emilio> iank_: we could also add a switch to allow you to align to a legend if that use case comes up <emilio> fantasai: there's an issue to allow choosing baseline alignment box <fantasai> https://github.com//issues/1339 <heycam> emilio: I was going to say something related what Ian said. we could add a switch but I'd also like to ignore the legend <Rossen_> ack emilio <heycam> ... if the use case for aligning to a legend comes up often, where you're aligning text outside the fieldset with the legend of the fieldset, which seems odd, we could look to allow that <heycam> ... but seems farfetched <heycam> ... for most cases top alignment should do <Rossen_> ack zcorpan <emilio> zcorpan: we discussed whether there's a case where legends wouldn't be align <emilio> ... if you have a fieldset with one line of text and another when the legend is 2+ lines of text <emilio> ... those wouldn't be necessarily align <emilio> ... depending on what we decide <emilio> ... maybe I misunderstood <astearns> no, I had the same idea <emilio> iank_: that's a similar problem if you try to align a fieldset with a legend and one without <emilio> Rossen_: it sounds the obvious use case is that the first baseline of content needs to be available <emilio> ... we need to resolve to have first-line baseline based on the content <emilio> ... be available. The second question is whether we need to make the legend baseline available <heycam> emilio: I would propose to try resolving the default be the baseline of the content <heycam> ... if there are use cases that can't be solved without the baseline of the legend, work on what fantasai was talking about, choosing the baseline box <emilio> Rossen_: seems to agree with the majority of the +1s and arguments made <zcorpan> +1 <emilio> Rossen_: fantasai, objections? <emilio> fantasai: defer to emeyer and jensimmons <emilio> s/fantasai, // <emilio> emeyer: the proposed resolution is to default to first or last baseline of the content? <emilio> emilio: both baselines first and last would be baseline of the content box <emilio> emeyer: feels probably correct, I'll take al look at various cases to confirm it's not a bad idea, but seems like the best resolution <emilio> RESOLVED: default first and last baselines to be the fieldset content's |
…e legend. This patch is to reflect the CSSWG resolution in w3c/csswg-drafts#7656 (comment)
… legend. r=dshin This patch is to reflect the CSSWG resolution in w3c/csswg-drafts#7656 (comment) Differential Revision: https://phabricator.services.mozilla.com/D172529
I just ran into this today. I honestly prefer WebKit's current behavior; it feels less magic, is more visually appealing, and matches authorial intent. |
For reference, the labels in #7656 (comment) were wrong:
WebKit's current behavior may be more visually appealing just like |
This will need text in the html spec - however likely can get on the same page here first as well.
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=10640
Fieldsets likely want to determine their baselines from the "anonymous fieldset content box" https://html.spec.whatwg.org/#anonymous-fieldset-content-box
The text was updated successfully, but these errors were encountered: