A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/mathml-polyfills/wiki/MathML-Polyfill-Task-Force-Guidelines below:

MathML Polyfill Task Force Guidelines · w3c/mathml-polyfills Wiki · GitHub

Note: this is meant to be an evolving wiki page that starts with examples, moves on to possible strategies for the polyfills, and ends up with strategy/guidelines for how the polyfills should be written and work together. The focus is on polyfill writers, with a separate page eventually for those who (might) want to use the MathML polyfills.

Note: some discussion on polyfills are in this issue.

Lessons Learned from Polyfills MathML polyfills that transform MathML to MathML

Items marked with "✓" have been implemented

The remaining polyfills may be a bit different than the above ones:

Polyfills that need to measure the rendered MathML ✓Line breaking/indentation -- requires measuring MathML and access to full DOM (for alignment)

mo has a set of attributes used for linebreaking and also a set that is used for indentation following the linebreak. None of these are in core.

One of the linebreaking attributes is linebreak and has values "auto" | "newline" | "nobreak" | "goodbreak" | "badbreak". For legacy reasons, mspace also allows linebreak. newline forces a linebreak; this is an obvious starting point for getting linebreaking to work. The indentation after the linebreak is important; that is controlled by a number of mo indent attrs. A reasonable linebreaking algorithm is given in the full spec. It is based on breaking before or after mo (based on the value of the linebreakstyle attr). It requires knowing:

  1. the block width,
  2. the amount of the line that is used up to the point of the mo,
  3. the depth in the mathml tree at the point of the mo,
  4. the amount the next line will indent, and
  5. whether a linebreak value has been specified

To do this polyfill, the polyfill will need to layout the mrow to be line wrapped and be able to determine the horizontal offset from the start of the line/mrow at each mo element. Maybe the result ends up using absolute positions to position (x,y) of the subsequent lines, or maybe a table is used (one line == one row in the table with columns to deal with alignment), maybe grid or flexbox layout can be used. Or maybe this is a case where a little pre-planning for supporting linebreaks in core leads to a few features that a polyfill could take advantage of such as allowing children to get a block layout.

Labeled as needing polyfills but probably not needed

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4