_main.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. /* Main */
  7. #main {
  8. @include vendor('flex-grow', '1');
  9. @include vendor('flex-shrink', '1');
  10. @include vendor('display', 'flex');
  11. @include vendor('align-items', 'center');
  12. @include vendor('justify-content', 'center');
  13. @include vendor('flex-direction', 'column');
  14. position: relative;
  15. max-width: 100%;
  16. z-index: 3;
  17. article {
  18. @include vendor('transform', 'translateY(0.25rem)');
  19. @include vendor('transition', (
  20. 'opacity #{_duration(article)} ease-in-out',
  21. 'transform #{_duration(article)} ease-in-out'
  22. ));
  23. @include padding(2.5rem, 2.5rem, (2rem, 0, 1rem, 0));
  24. position: relative;
  25. width: 40rem;
  26. max-width: 100%;
  27. background-color: transparentize(_palette(bg), 0.15);
  28. border-radius: _size(border-radius);
  29. opacity: 0;
  30. &.active {
  31. @include vendor('transform', 'translateY(0)');
  32. opacity: 1;
  33. }
  34. .close {
  35. display: block;
  36. position: absolute;
  37. top: 0;
  38. right: 0;
  39. width: 4rem;
  40. height: 4rem;
  41. cursor: pointer;
  42. text-indent: 4rem;
  43. overflow: hidden;
  44. white-space: nowrap;
  45. &:before {
  46. @include vendor('transition', 'background-color #{_duration(transition)} ease-in-out');
  47. content: '';
  48. display: block;
  49. position: absolute;
  50. top: 0.75rem;
  51. left: 0.75rem;
  52. width: 2.5rem;
  53. height: 2.5rem;
  54. border-radius: 100%;
  55. background-position: center;
  56. background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" viewBox="0 0 20 20" zoomAndPan="disable"><style>line { stroke: #{_palette(border)}; stroke-width: 1; }</style><line x1="2" y1="2" x2="18" y2="18" /><line x1="18" y1="2" x2="2" y2="18" /></svg>');
  57. background-size: 20px 20px;
  58. background-repeat: no-repeat;
  59. }
  60. &:hover {
  61. &:before {
  62. background-color: _palette(border-bg);
  63. }
  64. }
  65. &:active {
  66. &:before {
  67. background-color: _palette(border-bg-alt);
  68. }
  69. }
  70. }
  71. }
  72. @include breakpoint('<=small') {
  73. article {
  74. @include padding(2rem, 2rem, (1.5rem, 0, 0.5rem, 0));
  75. .close {
  76. &:before {
  77. top: 0.875rem;
  78. left: 0.875rem;
  79. width: 2.25rem;
  80. height: 2.25rem;
  81. background-size: 14px 14px;
  82. }
  83. }
  84. }
  85. }
  86. @include breakpoint('<=xsmall') {
  87. article {
  88. @include padding(2rem, 1.5rem, (1rem, 0, 0.5rem, 0));
  89. }
  90. }
  91. }