contivero / hasmin

Hasmin - A Haskell CSS Minifier
BSD 3-Clause "New" or "Revised" License
57 stars 4 forks source link

@font-face fields: unicode-range mangled, font-weight fails. #8

Open galenhuntington opened 4 years ago

galenhuntington commented 4 years ago

unicode-range is mangled:

Hasmin> minifyCSS "@font-face { font-family: serif; unicode-range: U+0-FF, U+2?? }"
Right "@font-face{font-family:serif;unicode-range:U 0 -FF,U 2 ?? }"

The latter syntax is not valid, and so the rule is ignored.

Also, font-weight inside of @font-face accepts two-argument values, but using the syntax causes an error:

Hasmin> minifyCSS "@font-face { font-family: serif; font-weight: 400 700; }"
Left "'{': Failed reading: satisfy"
contivero commented 4 years ago

Thanks for reporting this! Unfortunately I'm quite short on time lately, so a pull request would be very much welcome. Otherwise, I'll fix this whenever I have some time, but can't currently make any promises as to when.