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

reflowing content inside MathML token elements #208

Open
dginev opened this issue Oct 3, 2023 · 1 comment
Open

reflowing content inside MathML token elements #208

dginev opened this issue Oct 3, 2023 · 1 comment

Comments

@dginev
Copy link

dginev commented Oct 3, 2023

Sometimes a token element's content can horizontally overflow the current page width, especially when the page is styled with a maximum width. What is the right strategy for reflowing such elements? (especially <mn>)

If the overflowing text node was in regular HTML, one could use the CSS word-break property to induce a break. Currently that property doesn't successfully act on <mn> on either Firefox or Chrome. Here is a codepen demonstrating that:

https://codepen.io/dginev/pen/QWzVZNj

So I am opening an issue to ask:

  • should word-break: break-all; be used in such situations?
  • if not, what is a good mechanism to achieve reflow, specifically when the plain-text content of a token element exceeds the page width.

Context: In a recent discussion of a web resource (namely computational discovery on jupyter ), I encountered an example which deposits an <mn> with 694 binary digits.

@dginev
Copy link
Author

dginev commented Oct 30, 2023

Determined in mathml-core meeting on Oct 30, 2023: This is a level-2 issue, which has lesser priority than the main reflow deliverable of level-2.

For the short term, there is a very useful workaround for Chrome - using a <span> child underneath any MathML token element that needs wrapping CSS to activate. Namely <mn><span>123...</span></mn>, successfully inherits and activates a rule such as

mn {
  word-break: break-all;
}

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

2 participants