-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
unicode-range could be minified #321
Comments
That sounds like a great idea! Thanks for the suggestion. Is this something you'd like to give a shot at? Note that you'll need https://github.com/tdewolff/hasher to add a new entry to the |
Awesome, I was worried it might be too specific/niche for a general purpose minifier. If I get a supply of tuits I might take a crack at this, maybe for Hacktoberfest. Thanks. |
Great, thanks a lot! Let me know if you need any help. I think this would be a perfect addition to the library. |
@JRaspass if you'll still looking for Hacktoberfest contributions...you'd be welcome to ;-) |
Ta for the reminder, I should try and sit down and understand your codebase. If I'm right I think Basically I need to sit down and play but I might just do one transformation to start with, whichever is easiest. |
You'll need to add an entry in |
No worries! Thanks a lot for the effort, it helped in forming this commit! |
In order to correctly serve an emoji font only when an emoji is present on a page and to override whatever glyphs exists in the body font (like that horrid b/w teacup) I use the following css:
The last property currently minifies to the following:
Based on reading https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range I think we could be smarter. Adjacent ranges could be collapse, so
U+2600-26FF,U+2700-27BF
→U+2600-27BF
and ranges with common start and end digits could be rewritten to use wildcards, soU+2300-23FF
→U+23??
What do you think? I like keeping the source code explicit with the names of each range since "emojs" as a concept are so spread out and keep getting added to, in an ideal world we'd have something like w3c/csswg-drafts#4573 but alas not yet.
The text was updated successfully, but these errors were encountered: