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

SVG spinners #79

Closed
silverwind opened this issue Dec 15, 2013 · 26 comments
Closed

SVG spinners #79

silverwind opened this issue Dec 15, 2013 · 26 comments

Comments

@silverwind
Copy link
Member

These are really ugly right now:

loader

I ponder if we should add them to our existing class for inverting images, or if you plan to redo these gifs.

I'd love seeing them converted to APNG, but that would screw Chrome users without the APNG addon :P

@Mottie
Copy link
Member

Mottie commented Dec 15, 2013

Hmm, yeah the 16x16 icon really looks horrible... I actually inverted them in photoshop, so you are seeing the result hang head

@silverwind
Copy link
Member Author

In case you're working on these: We could provide a 32x32 instead of a 16x16, and then scale them down 50% in CSS so that they'll look nice on 200% zoom (Retina etc.) too. Or even better yet, provide SVG icons.

@Mottie
Copy link
Member

Mottie commented Dec 15, 2013

Well here is the 64x64 image 64x64

http://stylishthemes.github.io/Github-Dark/images/octocat-spinner-64-dark.gif

and 32x32 image 32x32

http://stylishthemes.github.io/Github-Dark/images/octocat-spinner-32-dark.gif

Hmm, yeah inverting the image in photoshop didn't work out so good...

@silverwind
Copy link
Member Author

I'd say we provide one clean spinner image, preferably SVG (SMIL) or at least 128x128 and let the browser do the scaling.

I'll have a look at doing it in SMIL. Gives me a reason to finally learn it :P

@silverwind
Copy link
Member Author

Actually, let's not do it in SMIL, that language is just atrocious. I'll most likely do it in plain SVG with CSS animation.

@Mottie
Copy link
Member

Mottie commented Dec 15, 2013

I'm working on a cleaner gif version.

Mottie added a commit that referenced this issue Dec 16, 2013
@Mottie
Copy link
Member

Mottie commented Dec 16, 2013

I've added a 128x128 version (not currently used)

128x128

and a new 16x16 version

16x16

@ddavison
Copy link
Member

can this issue be closed? this looks great

@silverwind
Copy link
Member Author

Not yet! I'm looking to do them through SVG+CSS animation. But go ahead and commit these right now, its certainly an improvement.

@silverwind
Copy link
Member Author

Almost done! Just have to figure out why it isn't looping correctly.

http://codepen.io/silverwind/details/ocxpD

Hope you like my almost-symmetrical octocat :D

@Mottie
Copy link
Member

Mottie commented Dec 16, 2013

LOL nice... you know, it's just a loading icon, it doesn't have to be exactly the same ;)

@silverwind
Copy link
Member Author

Yeah, it was a nice exercise nonetheless. Also, I suck at coming up with something creative for a loading icon :)

@ddavison
Copy link
Member

nice! haha. how the heck did you find the paths for doing octocat?!?

@silverwind
Copy link
Member Author

@ddavison: By hard work in the svg editor :)

Also, It's done, animation-delay made the keyframes a lot simpler: http://codepen.io/silverwind/details/ocxpD

I'll look to integrate it into the style later.

@ddavison
Copy link
Member

doesn't seem to be working from chrome.. you might need to add -moz-animation and -webkit-animation

@silverwind
Copy link
Member Author

Indeed, but it's not about prefixes. Probably Chrome doesn't like my animation syntax.

@silverwind
Copy link
Member Author

Alright, fixed in Chrome too: http://codepen.io/silverwind/details/ocxpD

It choked on my animation shorthand as expected :P

@ddavison
Copy link
Member

curious, will this CSS be included in the github-dark stylesheet? If so, we can have the fade-to color be their theme color!

@ddavison
Copy link
Member

same with the fill: on #cat ! 👍 that'd look niiiice.

@silverwind
Copy link
Member Author

That should be trivial. The hard part now is get it scaled correctly.

@ddavison
Copy link
Member

it's extremely trivial, just popping out suggestions :)

@silverwind
Copy link
Member Author

I know :) I'll be sure to include colored spinners!

@silverwind
Copy link
Member Author

Been trying to get these svg spinners in, but I guess I've hit the limits of CSS here. If I load the svg as an background-image I can't seem to select the svg elements for animation purposes.

I see two possible solutions to this:

  • Try it with SMIL (Uncertain if it will animate when set as background-image).
  • Convert the Userstyle into a Userscript and replace the spinner images with the svg through JS. This would give us svg directly in the markup which certainly can be animated.

@auscompgeek
Copy link
Contributor

This might be a silly question, but would it be possible to load the SVG in an :after's content?

@silverwind
Copy link
Member Author

I'm sure that's possible but it seems that SVGs loaded as an image (either through , or as CSS background) are treated as static images and can't be animated. The only way to animate it through CSS is to load it inline in HTML.

I'm still pondering if it's worth switching the style to a script for this, or alternatively, provide a small addon-script that complements the style.

@silverwind
Copy link
Member Author

Continued in StylishThemes/GitHub-Dark-Script#2

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

4 participants