videojs / font

Icon font used for Video.js
https://videojs.github.io/font/
Apache License 2.0
60 stars 79 forks source link

How to deal with source mapping changes #10

Closed sprice closed 8 years ago

sprice commented 8 years ago

The audio description icon used to be \f114 and now it's \f11d. What's the best way to build an external plugin using an icon from this package without relying on these mappings?

gkatsev commented 8 years ago

Hm... well, hopefully we never have this change. Not really sure how things are generated but we should probably put the audio description icon back to \f114. Or At this point maybe even keep both...

gkatsev commented 8 years ago

Also, I think we probably should move away from using the codepoint altogether and use classes to target things so if the codepoints do change, we won't have issues.

sprice commented 8 years ago

\f114 is now another icon.

I for one certainly like the idea of never changing the codepoints :smile: Classes are a great idea as well.

mmcc commented 8 years ago

I went down the path of trying to make sure codepoints get locked down, but that's a can of worms giving the tooling we have available :dizzy_face:. After thinking through it for a while, I don't think it would ever be a good idea for us to advertise that the codepoints will never change (even if we did lock them down), just because of how inflexible that would make things for us.

Anyway, everything is already targeted by classes. When the font is generated, it automatically generates the CSS / SCSS files with the correct mappings, then Video.js imports the styles (SCSS for VJS) into its own work flow. In a plugin that assumes the Video.js CSS exists, the icon classes will merrily stay updated for you all the time :)

All the CSS classes

mmcc commented 8 years ago

Also, @gkatsev just pointed out this exists: http://videojs.github.io/font

sprice commented 8 years ago

Thanks! I've updated my plugin to use the class name.