Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add @font-face #251

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

listrophy
Copy link

@listrophy listrophy commented Mar 28, 2017

This code is currently in-progress and should not be merged

This PR will add @font-face support for the most commonly used attributes:

  • font-family
  • src
  • font-variant
  • font-weight
  • font-style

It does not implement unicode-range, font-feature-settings, or font-stretch. Other authors are encouraged to add these in later.

Questions for elm-css core team

There already exist functions called fontFamily and src in elm-css. They seem to be incompatible with the semantics of @font-face. To wit:

fontFamily takes only FontFamily a, which only allows for serif, sansSerif, monospace, cursive and fantasy. In this case, we're defining a brand new font with a new name. The docs suggest using fontFamilies if you want custom-named fonts, but that doesn't make sense here because we're defining one font name.

src is of type ImportType compatible -> String, and I just really don't know what to do about that.

To see what an ideal implementation would look like, see the proposed fixture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant