Skip to content

Instantly share code, notes, and snippets.

View josephscottstevens's full-sized avatar

Joseph Scott Stevens josephscottstevens

View GitHub Profile
type Msg
= DropdownItemClicked Int
type alias Model =
{ isDropped : Bool
, options : Array Thing
, selected : Int
}
@evancz
evancz / font-face.md
Last active March 14, 2019 09:07
It seems really complicated to use custom fonts well. This explores some ideas of how to make it easier.

Making it easier to load fonts

I have been doing a lot of work on making Elm assets really tiny. As part of some exploratory research I did ages ago, I read this document on font loading. It is a super helpful resource, but I was confused by all the different terms: FOIT, FOUT, FOFT, etc. It reminded me of the old "how do you center things?" blog posts from before flexbox. So my instinct was that probably lots of folks are confused about how to do it well, and maybe there is a better way!

So brainstormed some some ideas to:

  1. Save even more bits.
  2. Have an ideal visual experience.
  3. Be really easy to set up.