Skip to content
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 interoperability with vertical-align #273

Open
dani31415 opened this issue Feb 18, 2019 · 8 comments
Open

CSS interoperability with vertical-align #273

dani31415 opened this issue Feb 18, 2019 · 8 comments

Comments

@dani31415
Copy link
Contributor

The CSS vertical-align property should work as per specification with MathML (CSS spec). The resolution of this issue is perhaps just related to create some tests and does not affect the MathML specification.

Some examples are

<img height="40" src="https://www.w3.org/html/logo/img/mark-word-icon.png">
<math><mi style="vertical-align:top">24</mi></math>

with result

Top alignment

and

<math>
    <mn>4</mn>
    <mo>-</mo>  
    <mfenced>
        <mrow style="vertical-align:middle">
            <mfrac>
                <mfrac>
                    <mi>x</mi>
                    <mn>2</mn>
                </mfrac>
                <mn>2</mn>
            </mfrac>
        </mrow>
    </mfenced>
</math>

with result

Fractions and vertical alignment

@fred-wang
Copy link
Contributor

I think this makes sense for the long term, IMHO it's way too early to consider this for the Core spec. Igalia is still working with Google to clarify the box and layout models, so I'd prefer to keep things simple and just ignore the vertical-align value for box layout for now.

@fred-wang
Copy link
Contributor

I think vertical-align is not what we want. It is is supposed to apply to inline boxes.

The dominant-baseline property looks closer to what we want:
https://www.w3.org/TR/css-inline-3/#propdef-dominant-baseline

@NSoiffer
Copy link
Contributor

I wasn't aware that there was a "dominant-baseline" property. Interestingly they mention a value of mathematical. They don't use the word "axis" in their description of it, but it seems like we can influence the language they used (it is marked with an issue that the section is being rewritten) and perhaps this is a way to get the notion of math axis into CSS...

@fred-wang
Copy link
Contributor

This is mentioned in the current core spec:
https://mathml-refresh.github.io/mathml-core/#box-model

@NSoiffer
Copy link
Contributor

What's left to do? Can this be closed or does some other issue need to be resolved before this can be closed?

@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 2, 2020

Need to write a test that shows setting vertical-align does nothing.

@rwlbuis
Copy link
Contributor

rwlbuis commented Mar 2, 2020

I will try to add that test.

@NSoiffer
Copy link
Contributor

I don't see a test in https://github.com/web-platform-tests/wpt/tree/master/mathml/relations/css-styling.

@fred-wang: Does a test still need to be written?

Transferring to core...

@NSoiffer NSoiffer transferred this issue from w3c/mathml Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants