-
Notifications
You must be signed in to change notification settings - Fork 78
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
Discussion to refactor icon inclusion template #19
Comments
personally, I feel like moving away from sass (and some others have similar sentiments). |
Having these live as separate classes that are used should make it easier to override, I'd hope. |
I guess, I still really like sass, so I cannot really comment, but regardless of the processing, if you have each icon bake everything into it, then you will need to repeat code for every icon. If you had a Just my two cents. Feel free to close if there is already a solid direction you guys are headed in whatever repository. |
Having a |
I had 2 classes in my first stab at this, but at this point I don't remember if I had a good reason for moving to one. I think all of this makes sense, though, I think moving the font-family declaration to a new class is reasonable.
I spent a while messing with CSSNext a few months ago and had a disastrous experience. 10/10 would not do again (for a while). |
@mmcc but we need to move away from sass or at least fix our usage of sass because videojs/video.js#3692. I don't think in videojs we're using anything specific of sass that isn't easily usable in postcss or just plain-old css. But that's a matter for another discussion :) |
In similar spirit to videojs/video.js#1880.
https://github.com/videojs/font/blob/master/scss/_icons.scss#L74
The code above specifies the
font-family
for every icon—making overriding difficult. My recommendation would be to separate that out and have a mixin be created to include thefont-family
and associated props only when needed.For controls such as play/pause or volume-0/volume-1/volume-2/volume-3, it really only requires the inclusion of the
font-family
on the control button. However, due to specificity rules I need to override everyone of them.Definitely not a 1:1 translation, but this is the way I manage custom icons.
I then have the flexibility to only include
icon-font
when necessary. Additionally, I need to add the appropriatecontent: $icon-{name}
.The text was updated successfully, but these errors were encountered: