Financial-Times / o-typography

Typography and vertical rhythm styles for FT branding
http://registry.origami.ft.com/components/o-typography
10 stars 2 forks source link

Update subscript and superscript size and positioning. #211

Closed notlee closed 5 years ago

notlee commented 5 years ago

o-normalise applies styles to sub and sup tags. These interact with seperate styles applied by o-typography. This appears to have caused unusually high/low superscript/subscript elements (confirmed with the design team).

before

Screenshot 2019-10-23 at 13 40 33

after

Screenshot 2019-10-23 at 13 40 34

This commit corrects the position by overriding default o-normalise styles. It also sets the size of superscript/subscript elements using relative units so they work in contexts outside of body copy.

origamiserviceuser commented 5 years ago

o-typography bundle size difference from 5.12.0 to b34cfa825e8a1d263f18106420afeb69efa37a71 css, master: 13.82kb decrease (-1.09kb/gzip) css, internal: 9.92kb decrease (-0.53kb/gzip) css, whitelabel: 1.04kb decrease (-0.05kb/gzip) An insignificant difference was also found for: js