Description
Describe the bug:
vertical-align property doesn't work as expected.
HTML to reproduce the issue:
<span>3</span><span style="vertical-align: super">x</span><span>-27 = 0<sup>x</sup></span>
Html
widget configuration:
Using clean Html or SelectableHtml.
Additional info:
I couldn't find the property vertical-align in the parser file:
flutter_html/lib/src/css_parser.dart
Line 10 in 9bf0662
I try to put it, like this, seems works fine in Html default constructor
case 'vertical-align':
style.verticalAlign =
ExpressionMapping.expressionToVerticalAlign(value.first);
break;
// ... //
static VerticalAlign expressionToVerticalAlign(css.Expression value) {
if (value is css.LiteralTerm) {
switch (value.text) {
case "sub":
return VerticalAlign.SUB;
case "super":
return VerticalAlign.SUPER;
}
}
return VerticalAlign.BASELINE;
}
but that doesn't work with the SelectableHtml constructor, throwing a exception in this cast:
flutter_html/lib/html_parser.dart
Line 334 in 9bf0662
i think its are related to flutter/flutter#38474, since it is merged, it's a leftover? removing this cast, works fine in my test case.
A picture of a cute animal (not mandatory but encouraged)