5 ms·
Quite apart from the very good content, this guide is also incredibly beautiful. It’s wonderful to see a programming guide that has thought hard about typograp
by muglug 6y ago
Quite apart from the very good content, this guide is also incredibly beautiful.
It’s wonderful to see a programming guide that has thought hard about typography (and Freight works great here).
- xixixao 6y agoIt might make sense to stretch the code blocks, to avoid horizontal scrolling which is quite annoying when reading code. Similar to photos breaking out of the text column on various sites.
- chrismorgan 6y agoAlso on the topic of horizontal scrolling, `overflow: scroll` is almost never what you want, because it causes scrollbars to be drawn even if unneeded. >99.99999% of the time you want `overflow: auto` which draws scrollbars only if needed.
- chrismorgan 6y agoI find font-family stacks to regularly be a source of amusement and/or bafflement. Here’s this site’s main one: font-family: freight-text, Iowan Old Style, Georgia, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; I… what? The web-font serif, then a macOS (I think?) serif, then a Windows serif, then… system-ui stuff which is almost always sans-serif, then sans-serif fallbacks. This is a bizarre mixture. This immediately makes much more sense: font-family: freight-text, Iowan Old Style, Georgia, serif; And I tend to think just this would be better: font-family: freight-text, serif; Also, one other rule that I can’t let pass by without comment: letter-spacing: .01em; Bumping letter-spacing is always risky: the designer chose the spacing they did for a reason. Pretty much the only circumstances you should do it are (a) very specific display purposes (that is, headings and the likes—typically 0.2em or more) and (b) all caps (typically something like 0.07ex). Body text letter-spacing bumps are almost always a bad idea. In this case, it’s even already using a fairly wide font. (Well, so long as freight-text is used. I really wish all font properties (font-, letter-spacing, &c.*) could be varied by font availability, so that you could do things like bump font-size if you use your own web font with smaller metrics than the likely fallback font.)