_bg.scss 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ///
  2. /// Dimension by HTML5 UP
  3. /// html5up.net | @ajlkn
  4. /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
  5. ///
  6. /* BG */
  7. #bg {
  8. @include vendor('transform', 'scale(1.0)');
  9. -webkit-backface-visibility: hidden;
  10. position: fixed;
  11. top: 0;
  12. left: 0;
  13. width: 100%;
  14. height: 100vh;
  15. z-index: 1;
  16. &:before, &:after {
  17. content: '';
  18. display: block;
  19. position: absolute;
  20. top: 0;
  21. left: 0;
  22. width: 100%;
  23. height: 100%;
  24. }
  25. &:before {
  26. @include vendor('transition', 'background-color #{_duration(bg)} ease-in-out');
  27. @include vendor('transition-delay', '#{_duration(intro)}');
  28. background-image: linear-gradient(to top, #{_palette(bg-overlay)}, #{_palette(bg-overlay)}),
  29. url('../../images/overlay.png');
  30. background-size: auto,
  31. 256px 256px;
  32. background-position: center,
  33. center;
  34. background-repeat: no-repeat,
  35. repeat;
  36. z-index: 2;
  37. }
  38. &:after {
  39. @include vendor('transform', 'scale(1.125)');
  40. @include vendor('transition', (
  41. 'transform #{_duration(article)} ease-in-out',
  42. 'filter #{_duration(article)} ease-in-out'
  43. ));
  44. background-image: url('../../images/bg.jpg');
  45. background-position: center;
  46. background-size: cover;
  47. background-repeat: no-repeat;
  48. z-index: 1;
  49. }
  50. body.is-article-visible & {
  51. &:after {
  52. @include vendor('transform', 'scale(1.0825)');
  53. @include vendor('filter', 'blur(0.2rem)');
  54. }
  55. }
  56. body.is-preload & {
  57. &:before {
  58. background-color: _palette(bg-alt);
  59. }
  60. }
  61. }