Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

FYI, `height: 15px` is wrong, because it’s not relative to the line-height, which you haven’t specified. Browsers will mostly default to a font-size of 13px for monospaced text (for bad reasons that should be discarded), which yields a line-height that will probably cause little to no clipping of the glyphs; but if you set the default monospace font larger, or have a monospace font with larger normal line-height, you may get clipping. For me with 16px Triplicate T4c as my default monospace font, all descenders are completely cut off.

You’d do better specifying a font-size and line-height, defining height in ems, or both.

(Source: the “try it” link on that page, https://githistory.xyz/babel/babel/blob/master/packages/babe..., which should probably be replaced with something else since the file in question got moved (babel-core → babel-register) and your tool doesn’t follow renames.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: