youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.24k stars 147 forks source link

Animation: Deprecate combo CSS classes in favor of discrete ones. #300

Closed nicksay closed 9 years ago

nicksay commented 9 years ago

Previously CSS animation classes had to target both the history direction (forward/back) as well as the animation point (start/end) via a combination class, even if the properties were shared:

.spf-animate-forward-start .spf-animate-new,
.spf-animate-forward-end   .spf-animate-old,
.spf-animate-reverse-start .spf-animate-new,
.spf-animate-reverse-end   .spf-animate-old {
  opacity: 0;
}

Now, the classes will be split into discrete ones that represent a single target only: .spf-animate-forward-start -> .spf-animate-forward.spf-animate-start .spf-animate-reverse-end -> .spf-animate-reverse.spf-animate-end

This allows less verbose CSS when doing animation that does not change based on history direction.

Progress on #299.

DavidCPhillips commented 9 years ago

LGTM