lungo.media.tablet.styl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. @import "constants.styl"
  2. // TRANSITION_TIME = 1s
  3. /* ==== Tablet ==== */
  4. // @media only screen and (min-width: 768px) and (max-width: 1280px)
  5. @media only screen and (min-width: 768px)
  6. body
  7. display-box()
  8. box-orient(horizontal)
  9. overflow: hidden
  10. aside
  11. width 15%
  12. transform translateX(-100%)
  13. transition-property transform
  14. transition-duration TRANSITION_TIME
  15. &.show
  16. transform translateX(0%)
  17. section
  18. ordinal-group(2)
  19. display: none
  20. opacity: 0
  21. transform translateX(100%)
  22. -webkit-animation: showing TRANSITION_TIME TRANSITION_TIME
  23. -webkit-animation-fill-mode: forwards
  24. &.show
  25. display-box()
  26. &.hide
  27. -webkit-animation: hiding TRANSITION_TIME
  28. &:not([data-child])
  29. box-flex (1)
  30. &[data-child]
  31. width: 25%
  32. margin-right: 0.5%
  33. [data-router=aside]
  34. display: none !important
  35. // &[data-transition]
  36. // display-box()
  37. // transition-propert transform, opacity
  38. // transition-duration( TRANSITION_TIME )
  39. // transition-timing-function( DEFAULT_TRANSITION )
  40. // backface-visibility( hidden )
  41. @-webkit-keyframes showing
  42. 0%
  43. opacity: 0
  44. transform translateX(100%)
  45. 100%
  46. opacity: 1
  47. transform translateX(0%)
  48. @-webkit-keyframes hiding
  49. 0%
  50. opacity: 1
  51. transform translateX(0%)
  52. 100%
  53. opacity: 0
  54. transform translateX(100%)