You are here

blazy.fx.blur.css in Blazy 8.2

Same filename and directory in other branches
  1. 7 css/components/blazy.fx.blur.css

Blur effect.

While blurring animation impresses smoother transition, it is likely slow. You can override this file, and change animation to just transition instead.

File

css/components/blazy.fx.blur.css
View source
  1. /**
  2. * @file
  3. * Blur effect.
  4. *
  5. * While blurring animation impresses smoother transition, it is likely slow.
  6. * You can override this file, and change animation to just transition instead.
  7. */
  8. /* Without transform, this is more of formality hooking into animation event.*/
  9. @-webkit-keyframes blazyBlur {
  10. from {
  11. opacity: .3;
  12. }
  13. to {
  14. opacity: 1;
  15. }
  16. }
  17. @keyframes blazyBlur {
  18. from {
  19. opacity: .3;
  20. }
  21. to {
  22. opacity: 1;
  23. }
  24. }
  25. /**
  26. * Js dynamic classes during animation to match animate.css convention.
  27. */
  28. .animated.blur img:not(.b-blur) {
  29. /* transition: opacity 500ms ease-in-out; */
  30. transition: none;
  31. /* The blurred image is not this actual image. */
  32. -webkit-animation: blazyBlur 1s;
  33. animation: blazyBlur 1s;
  34. }
  35. /* Supports reduced motion. */
  36. @media (print), (prefers-reduced-motion: reduce) {
  37. .animated.blur img:not(.b-blur) {
  38. -webkit-animation-duration: 1ms !important; /* csslint allow: known-properties, important */
  39. animation-duration: 1ms !important; /* csslint allow: known-properties, important */
  40. -webkit-transition-duration: 1ms !important; /* csslint allow: known-properties, important */
  41. transition-duration: 1ms !important; /* csslint allow: known-properties, important */
  42. -webkit-animation-iteration-count: 1 !important; /* csslint allow: known-properties, important */
  43. animation-iteration-count: 1 !important; /* csslint allow: known-properties, important */
  44. }
  45. .media--fx-lg .b-blur {
  46. filter: blur(1px);
  47. opacity: .9;
  48. }
  49. }