Closed ruuda closed 6 years ago
Awesome, thanks a bunch Ruud!
I had no idea that it could be done in a single request! I knew about the font weights, but I forgot they'd be used by formatting, and had no idea that the browser would try to generate one itself.
So yeah, I really appreciate this improvement and you sharing your site's code in the first place. Thanks!!
There are a few changes I've made that might be helpful to your site:
Indentation for one level of nesting of <ul>
, usage of square for the bullet https://github.com/mgsloan/mgsloan-site/commit/d1cfaa116d2100e03c77cf324511428e23b55695 . I imagine that the scaling would be quite font specific. I needed to scale the up the dot for normal bullets about 2x
Code to put the footer below the bottom of the page - https://github.com/mgsloan/mgsloan-site/commit/0b49c9d4f1d58695e9005a2c664b64c2006dc6f3 . On chrome, since the my index page at mgsloan.com is still pretty short, without this change, the footer would appear as band through the middle of the screen. With this change, you always have to scroll to see the footer, which is a little unusual, but I kinda like it. The main point of this is to ensure that it is flush with the bottom of the screen. Haven't been able to get it to work under firefox unfortunately, so I will probably remove min-height: -moz-available
since it doesn't seem to work.
I think the development setup I added to the readme works pretty well - https://github.com/mgsloan/mgsloan-site/blob/master/readme.md#how-to-do-quick-iterative-writing--modification . The live reload stuff does not work flawlessly, but eh, good enough for now.
I was just browsing Reddit, and then I stumbled upon a page that looked familiar. I like what you did to it :)
You missed one thing though; by default the Google Fonts API sends only a stylesheet that includes the regular weight and style. If you want bold and italic, you have to explicitly ask for them. Otherwise the browser will generate one, which doesn’t work very well for serif fonts.
Before:
After:
Also, all of the requests can be collapsed into one to reduce the number of roundtrips (when not using http/2) and to reduce the page size.