TypeScript-Handbook icon indicating copy to clipboard operation
TypeScript-Handbook copied to clipboard

Don't use ems (or use carefully) - they compound in CSS

Open blakeembrey opened this issue 8 years ago • 2 comments

Not sure where to log issues with the design itself, so please redirect me if needed. The issue is with the use of ems for the design - in CSS, they compound on top of each other and can result in some larger than expected sizing if you aren't careful. For example:

image

This occurs because the list item is within another list item and 1.6 * 1.6 = 3.2em.

blakeembrey avatar Nov 28 '16 21:11 blakeembrey

This also happens on the page on enums:

https://www.typescriptlang.org/docs/handbook/enums.html#computed-and-constant-members

screenshot from 2018-05-11 10-09-45

ZhangYiJiang avatar May 11 '18 02:05 ZhangYiJiang

Sure would be nice if I could submit a pull request to fix this ...

SamB avatar May 29 '19 20:05 SamB