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

Have <legend align> map to justify-self #4013

Closed
zcorpan opened this Issue Sep 7, 2018 · 2 comments

Comments

2 participants
@zcorpan
Member

zcorpan commented Sep 7, 2018

See https://bugzilla.mozilla.org/show_bug.cgi?id=1488228#c26

@whatwg/fieldset, any thoughts?

We'd need to specify the interaction with margins, since currently you can specify the position of the legend using inline-direction margins in CSS.

@MatsPalmgren

This comment has been minimized.

Show comment
Hide comment
@MatsPalmgren

MatsPalmgren Sep 12, 2018

I don't think you need to specify anything in particular about margins since CSS Align already specifies how it works. If anything, you could say that the <legend>'s margin-box is used (or more generally, that the fieldset/legend alignment uses the block-level rules). So, author auto-margins should just work.

BTW, here's my original arguments for why justify-self is the ideal property to use for this. I'm even more convinced now that this is the way to go because mapping it to some auto-margin value is pretty complicated when the fieldset/legend have different writing-mode. It's not something that you can express using CSS rules.

@zcorpan can you update the spec to use justify-self please? I think it's better if people review that proposal rather than auto-margins.

MatsPalmgren commented Sep 12, 2018

I don't think you need to specify anything in particular about margins since CSS Align already specifies how it works. If anything, you could say that the <legend>'s margin-box is used (or more generally, that the fieldset/legend alignment uses the block-level rules). So, author auto-margins should just work.

BTW, here's my original arguments for why justify-self is the ideal property to use for this. I'm even more convinced now that this is the way to go because mapping it to some auto-margin value is pretty complicated when the fieldset/legend have different writing-mode. It's not something that you can express using CSS rules.

@zcorpan can you update the spec to use justify-self please? I think it's better if people review that proposal rather than auto-margins.

@zcorpan

This comment has been minimized.

Show comment
Hide comment
@zcorpan

zcorpan Sep 12, 2018

Member

OK, that sounds easy, then. Happy to oblige.

Member

zcorpan commented Sep 12, 2018

OK, that sounds easy, then. Happy to oblige.

zcorpan added a commit that referenced this issue Sep 12, 2018

zcorpan added a commit to web-platform-tests/wpt that referenced this issue Sep 12, 2018

zcorpan added a commit that referenced this issue Sep 14, 2018

zcorpan added a commit to web-platform-tests/wpt that referenced this issue Sep 17, 2018

zcorpan added a commit that referenced this issue Sep 19, 2018

Revamp how fieldset and legend rendering is defined
Properly define the rendering of the fieldset and legend elements.

The layout model used is most similar to Gecko, which uses an anonymous box to hold the fieldset's contents.

Fixes #3955, fixes #3930, fixes #3929, fixes #3928, fixes #3927, fixes #3915, fixes #3913, fixes #3660, fixes #3331, fixes #2756, fixes #4013.

Tests:
https://github.com/web-platform-tests/wpt/tree/master/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements
https://github.com/web-platform-tests/wpt/tree/master/html/semantics/forms/the-fieldset-element

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 20, 2018

Bug 1490645 [wpt PR 12965] - HTML: legend align maps to 'justify-self…
…', a=testonly

Automatic update from web-platform-testsHTML: legend align maps to 'justify-self'

See
whatwg/html#3934
whatwg/html#4013
--

wpt-commits: 51ceab16ec539fd421322727f93a847f7855e317
wpt-pr: 12965

xeonchen pushed a commit to xeonchen/gecko that referenced this issue Sep 20, 2018

Bug 1490645 [wpt PR 12965] - HTML: legend align maps to 'justify-self…
…', a=testonly

Automatic update from web-platform-testsHTML: legend align maps to 'justify-self'

See
whatwg/html#3934
whatwg/html#4013
--

wpt-commits: 51ceab16ec539fd421322727f93a847f7855e317
wpt-pr: 12965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment