You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stylesheet rules that name sup or sub never apply #649
A stylesheet rule whose selector names sup or sub never applies, in either cssMode. A class rule on the same element does apply:
<style>sup { color:#f00 }</style><p>x<sup>2</sup></p><!-- the 2 is drawn black --><style>.s { color:#f00 }</style><p>x<supclass="s">2</sup></p><!-- the 2 is drawn red -->
SUP and SUB are missing from allowedCSStags (src/Config/ConfigVariables.php), so rules keyed by those tags are never merged into them. That means common resets such as normalize.css's sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline } do nothing.
mPDF draws sup and sub with its own size and offset (textvar). Adding the tags to the list has to be checked against that, so that a rule changing font-size or vertical-align takes over from the built-in handling rather than stacking on it. Check whether any other inline tag mPDF supports is missing from the list too.
Reproduced on gravitypdf at e685435. Found while working on #646. Part of #552.
Activity