Polyfill and meeting

Hi,



First of all, my apologies since I’m not available tomorrow/today for the
meeting since I’m travelling to a conference.



The good news is that I’ve not been idle and I’ve added two further
examples to the polyfill:

1.     Matrix alignment with fences
2.     Grammar analysis (language subject)

Unfortunately, I’m travelling and I’m not able to update the examples
online. The old version is still available at:
https://codepen.io/daniwiris/pen/rGKENd



>From the current examples, I learnt that the minimum requirements are to be
able to align respect to a given child in the following two scenarios:

1.     A vertical flexbox
2.     A table or grid

For the table, the alignment is only well defined when the affected row
(the children of tables are rows) has all its cells aligned by the
baseline, which is already possible to do with the current CSS
specification. Things are a little more disgusting because tables contain
an extra tbody element…



Despite these minimal requirements, I implemented a version of the polyfill
that is able to align a flexbox or table according to any of its
descendants using a CSS like selector. It is fine to have such
functionality but maybe we are overkilling the solution.



I used the handy selectionQuery method in JavaScript which seemed an ideal
solution until I discovered that selectionQuery never returned the node I
expected when multiple nodes satisfied the criteria. For example,
“:nth-child(2)” actually means any second child of any successor.



Another idea is that probably makes more sense defining the “baseline” than
change the “vertical-align”. Thus,

Preferred solution:

            baseline: “:nth-child(2)”;

            vertical-align: “baseline”;

Less preferred solution:

             vertical-align: “:nth-child(2)”



I’ve also experimented with the stretchy solution. I think that it is great
but at the same time discovered that the browser does not render in the
same form normal text than scaled one (we already saw that in Peter’s
demo). This yields, again, that the different parts do not match perfectly.
For example, the minus sign had different weight when zoomed horizontally.
So the theory that this is a solution for perfect fraction lines is not
true. I’m not worried about that. Eventually we could blame the browsers
and they might fix it from their side.


I'm still with the idea of going to TPAC. But I'm not satisfied with the
current polyfill status.


Regards,


Dani

-- 

------------------------------
WIRIS and Design Science, makers of MathType, have joined forces!
Thank you for your patience as we transition from dessci.com to wiris.com.

Received on Wednesday, 25 October 2017 23:03:50 UTC