astrada / ppx_bs_css

A ppx rewriter for CSS expressions.
MIT License
98 stars 7 forks source link

font-family support #7

Closed jchavarri closed 6 years ago

jchavarri commented 6 years ago

There seems to be a few challenges with font families:

  1. The font-family values don't have quotes around them, so:
[%style
  {typed|
  font-family: Helvetica;
  |typed}
]

fails to compile, as Helvetica gets compiled as is, but it is not defined.

  1. Some font family names have spaces. For example:
[%style
  {typed|
  font-family: Helvetica Neue;
  |typed}
]

Gets interpreted as two values right now, and fails as "fontFamily2 can't be found".

  1. A set of families uses commas to separate:
[%style
  {typed|
  font-family: Helvetica, Arial;
  |typed}
]

fails with "Unsupported delimiter".

astrada commented 6 years ago

Should be fixed in branch issue7. If you can confirm, I will merge it to master. Thanks!

jchavarri commented 6 years ago

Woah that was fast ⚡️ It works great! 👍