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

compress inefficient use of unicode-range #1030

Closed
loominade opened this issue May 17, 2018 · 1 comment
Closed

compress inefficient use of unicode-range #1030

loominade opened this issue May 17, 2018 · 1 comment

Comments

@loominade
Copy link

If an embedded font only contains characters used on certain pages, one wouldn't want to download it if its used on the current page. By defining the unicode-range of a font in a @font-face description, this can be achieved. But writing down all the codepoints in a font creates a very long unicode-range definition that can be shorted by collapsing groups.

Input CSS

@font-face {
  font-family: 'Openmoji';
  unicode-range: U+F0A0, U+F0A1, U+F0A2, U+F0A3, U+F0A4, U+F0A5, U+F0A6, U+F0A7, U+F0A8, U+F0A9, U+F0AA, U+F0AB, U+F0AC, U+F0AD, U+F0AE, U+F0AF;
}

Actual output CSS

– no change –

Expected output CSS

@font-face {
  font-family: 'Openmoji';
  unicode-range: U+F0A?;
}
@jakubpawlowicz
Copy link
Collaborator

Won't fix as clean-css is going into maintenance mode.

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

No branches or pull requests

2 participants