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

animations on pseudo elements don't work in safari #57

Open
Sam-Apostel opened this issue Aug 23, 2020 · 1 comment
Open

animations on pseudo elements don't work in safari #57

Sam-Apostel opened this issue Aug 23, 2020 · 1 comment

Comments

@Sam-Apostel
Copy link

a lot of the animations rely on the pseudo elements being animated.
Since this doesn't work in some browsers. I suggest favouring animating the base element:
eg:

@keyframes spinneralt {
	0% { transform: rotate(0deg) }
	to { transform: rotate(359deg) }
}

.gg-spinner-alt {
	transform: scale(var(--ggs,1));
	animation: spinneralt 1s cubic-bezier(.6,0,.4,1) infinite; /*  this line was defined on the before pseudo-element and moving it doesn't change the behaviour but improves browser compatibility */ 
}

.gg-spinner-alt,
.gg-spinner-alt::before {
	box-sizing: border-box;
	position: relative;
	display: block;
	width: 20px;
	height: 20px
}

.gg-spinner-alt::before {
	content: "";
	position: absolute;
	border-radius: 100px;
	border: 3px solid transparent;
	border-top-color: currentColor
}
@Sam-Apostel
Copy link
Author

I'm willing to go through and create a PR on this, checking in first. Is this a welcomed optimisation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant