You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define what inline percentages resolve against. #76
Consensus during mathml core meeting: Ignore width/height on all new layout as they are no clear use case and that simplifies implementation. It still makes sense for mtable or math elements.
Update: although my answer below touches on this issue, I think it is more relevant for w3c/mathml#50 since token elements are mostly (currently) defined as block level elements in the spec.
For leaf content, it seems that the answer lies in whether we decide leaves are inline or inline-block. If inline, then this question is trivially resolved (it's 0). Currently the core spec says that mtext (and hence many leaf elements) for layout are block box. Assuming this stays, then it seems like the width needs to be relative to a parent context that can set the width: either math or mtable. In the latter case, if it lies in a column of fixed with, then that's the context.
The issue of whether elements are block or inline has come up a number of times. My memory is that in most (all?) cases, having most elements be inline simplifies interactions with CSS. Although @fred-wang is probably not happy with opening up something he probably feels has to be the way the spec says it is, we probably should have an issue to at least get the rationale down so everyone can understand it and agree upon it.
Activity
fred-wang commentedon Jul 5, 2019
See https://github.com/mathml-refresh/mathml/issues/50#issuecomment-508737052
fred-wang commentedon Jul 29, 2019
Consensus during mathml core meeting: Ignore width/height on all new layout as they are no clear use case and that simplifies implementation. It still makes sense for mtable or math elements.
bfgeek commentedon Jul 29, 2019
You still need to define this for nested elements which do abide by width/height. (See test-case).
NSoiffer commentedon Jul 31, 2019
Update: although my answer below touches on this issue, I think it is more relevant for w3c/mathml#50 since token elements are mostly (currently) defined as block level elements in the spec.
For leaf content, it seems that the answer lies in whether we decide leaves are inline or inline-block. If inline, then this question is trivially resolved (it's 0). Currently the core spec says that mtext (and hence many leaf elements) for layout are block box. Assuming this stays, then it seems like the width needs to be relative to a parent context that can set the width: either
mathormtable. In the latter case, if it lies in a column of fixed with, then that's the context.The issue of whether elements are block or inline has come up a number of times. My memory is that in most (all?) cases, having most elements be inline simplifies interactions with CSS. Although @fred-wang is probably not happy with opening up something he probably feels has to be the way the spec says it is, we probably should have an issue to at least get the rationale down so everyone can understand it and agree upon it.
fred-wang commentedon Sep 9, 2019
Proposal: resolve percent against 0 in this case.
rwlbuis commentedon Sep 12, 2019
I am not sure that the original example is valid, according to the spec div is not allowed in span.
I did my experiments with:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=7193
fred-wang commentedon Sep 15, 2019
Consensus from 2019/09/12 is essentially: use the size provided by a block container without display: math
Support CSS width/height properties on MathML elements.
Bug 1916988 - Support CSS width/height properties on MathML elements.…
Bug 1916988 - Support CSS width/height properties on MathML elements.…
Bug 1916988 - Support CSS width/height properties on MathML elements.…
Bug 1916988 - Support CSS width/height properties on MathML elements.…
Support CSS width/height properties on MathML elements. (#48375)
Bug 1916988 - Support CSS width/height properties on MathML elements.…
Support CSS width/height properties on MathML elements
Bug 1916988 - Support CSS width/height properties on MathML elements.…