sdras / gsap-player

A small, customizable youtube-like player for gsap timelines
100 stars 9 forks source link

Inject Style via JS #4

Closed shshaw closed 7 years ago

shshaw commented 7 years ago

Negate the need for an external CSS inclusion :-)

shshaw commented 7 years ago

Demo: http://codepen.io/shshaw/pen/b591a6ee248a9fcab578bf038a5a4d15?editors=0010

For reference, I used http://refresh-sf.com/ to minify the CSS quickly

sdras commented 7 years ago

I LOVE the style injection, especially after running some perf tests to make sure it didn't impact the player. Nice work, Shaw.

sdras commented 7 years ago

I'll go in and remove the CSS file and fix up the readme, dependent on this change.

shshaw commented 7 years ago

Apologies for not updating the README. As soon as you accepted the pull request I remembered that.

Might want to keep the CSS file just to have a clean, non-minified CSS file to edit.

sdras commented 7 years ago

Yep, I realized that as soon as I was working on it. I kept the CSS intact, but the readme specifically denotes that you don't need it. Eventually I'll put in a better build system so there's a separate minified file and directory.