You are here

ultimenu.offcanvas.zoomin.css in Ultimenu 8.2

.is-ultimenu-canvas-off: #header or .region-primary-menu, etc. .is-ultimenu-canvas-on: any sibling of #header.

Tips: Use Modernizer.js to have graceful fallback for old browsers. Note the `transform` transitions, it is faster and smoother than `left` ones.

File

css/components/ultimenu.offcanvas.zoomin.css
View source
  1. /**
  2. * @file
  3. *
  4. * .is-ultimenu-canvas-off: #header or .region-primary-menu, etc.
  5. * .is-ultimenu-canvas-on: any sibling of #header.
  6. *
  7. * Tips: Use Modernizer.js to have graceful fallback for old browsers.
  8. * Note the `transform` transitions, it is faster and smoother than `left` ones.
  9. */
  10. @keyframes ultiZoomIn {
  11. from {
  12. opacity: 0;
  13. -webkit-transform: scale3d(.3, .3, .3);
  14. transform: scale3d(.3, .3, .3);
  15. }
  16. 100% {
  17. opacity: 1;
  18. -webkit-transform: scale3d(1, 1, 1);
  19. transform: scale3d(1, 1, 1);
  20. }
  21. }
  22. @keyframes ultiZoomOut {
  23. from {
  24. opacity: 1;
  25. -webkit-transform: scale3d(1, 1, 1);
  26. transform: scale3d(1, 1, 1);
  27. }
  28. 100% {
  29. opacity: 0;
  30. -webkit-transform: scale3d(.3, .3, .3);
  31. transform: scale3d(.3, .3, .3);
  32. }
  33. }
  34. /** The #header alike element, out of canvas by default, can exist once. */
  35. .is-ultimenu-canvas--active .is-ultimenu-canvas-off {
  36. left: 0;
  37. overflow: hidden;
  38. -webkit-animation-duration: .3s;
  39. animation-duration: .3s;
  40. -webkit-animation-fill-mode: both;
  41. animation-fill-mode: both;
  42. max-width: 100%;
  43. width: 100%;
  44. z-index: -1;
  45. }
  46. .is-ultimenu-canvas.is-ultimenu-expanded .is-ultimenu-canvas-off {
  47. -webkit-animation-name: ultiZoomIn;
  48. animation-name: ultiZoomIn;
  49. z-index: 9998;
  50. }
  51. .is-ultimenu-canvas.is-ultimenu-canvas--hiding .is-ultimenu-canvas-off {
  52. -webkit-animation-duration: .5s;
  53. animation-duration: .5s;
  54. -webkit-animation-name: ultiZoomOut;
  55. animation-name: ultiZoomOut;
  56. }
  57. /**
  58. * 944px with 16px base font.
  59. * .is-ultimenu-canvas--active is only available if off-canvas is enabled for
  60. * both desktop and mobile. Or a little later via JS if not. That's why we don't
  61. * rely on it for the smaller device to avoid FOUC.
  62. */
  63. @media only screen and (max-width: 58.999em) {
  64. /** The #header alike element, out of canvas by default, can exist once. */
  65. .is-ultimenu-canvas .is-ultimenu-canvas-off {
  66. z-index: -1;
  67. }
  68. .is-ultimenu-canvas.is-ultimenu-expanded .is-ultimenu-canvas-off {
  69. z-index: 9998;
  70. }
  71. }