_mixins.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. // MEDIA
  2. @mixin media-max ($size) {
  3. @media only screen and (max-width: #{$size}px) {
  4. @content
  5. }
  6. }
  7. @mixin media-min ($size) {
  8. @media only screen and (min-width: #{$size}px) {
  9. @content
  10. }
  11. }
  12. @mixin media-min-h ($size) {
  13. @media screen and (min-height: #{$size}px) {
  14. @content
  15. }
  16. }
  17. @mixin media-max-h ($size) {
  18. @media screen and (max-height: #{$size}px) {
  19. @content
  20. }
  21. }
  22. @mixin center {
  23. position: absolute;
  24. top: 50%;
  25. left: 50%;
  26. transform: translate(-50%, -50%);
  27. -webkit-transform: translate(-50%, -50%);
  28. }
  29. @mixin flex($justify: null, $align: null, $flow: null, $gap: null) {
  30. display: flex;
  31. @if $justify {
  32. justify-content: $justify;
  33. }
  34. @if $align {
  35. align-items: $align;
  36. }
  37. @if $flow {
  38. flex-flow: $flow;
  39. }
  40. @if $gap {
  41. gap: $gap;
  42. }
  43. }
  44. @mixin absolute($left: null, $top: null, $right: null, $bottom: null) {
  45. position: absolute;
  46. @if $left {
  47. left: $left;
  48. }
  49. @if $top {
  50. top: $top;
  51. }
  52. @if $right {
  53. right: $right;
  54. }
  55. @if $bottom {
  56. bottom: $bottom;
  57. }
  58. }
  59. @mixin desktop { @media (min-width: 1200px) { @content; } }
  60. @mixin tablet { @media (max-width: 1199px) { @content; } }
  61. @mixin mobile{ @media (max-width: 768px) { @content; } }
  62. @mixin mobile-sm{ @media (max-width: 575px) { @content; } }
  63. @mixin fz($size) {
  64. @if $size == l {
  65. font-size: var(--l);
  66. }
  67. @if $size == m {
  68. font-size: var(--m);
  69. }
  70. @if $size == s {
  71. font-size: var(--s);
  72. }
  73. }
  74. @mixin ai($width, $height) {
  75. &:after {
  76. content:'';
  77. display: block;
  78. padding-bottom: calc($height/$width*100%);
  79. }
  80. }
  81. @mixin effectBox{
  82. border-radius: var(--border-radius-main);
  83. border: 1px solid rgba(120, 88, 173, 0.20);
  84. background: rgba(147, 122, 189, 0.10);
  85. backdrop-filter: blur(32px);
  86. overflow:hidden;
  87. position:relative;
  88. &:before{
  89. content:'';
  90. width: 335px;
  91. height: 141px;
  92. position: absolute;
  93. right: -25px;
  94. top: -146px;
  95. border-radius: 335px;
  96. background: radial-gradient(178.52% 78.07% at 41.32% 26.64%, #EBBFFB 0%, #C570E3 85%);
  97. filter: blur(60px);
  98. transition: 0.3s ease-out;
  99. }
  100. &:after{
  101. content:'';
  102. width: 273px;
  103. height: 136px;
  104. position: absolute;
  105. left: 0;
  106. top: -110px;
  107. background:#937ABD;
  108. filter: blur(60px);
  109. border-radius: 335px;
  110. visibility: hidden;
  111. opacity: 0;
  112. transition: 0.6s ease-out;
  113. background: radial-gradient(178.52% 78.07% at 41.32% 26.64%, #EBBFFB 0%, #937ABD 85%);
  114. }
  115. &:hover{
  116. &:before{
  117. opacity:0;
  118. }
  119. &:after{
  120. content:'';
  121. left: -69px;
  122. top: -75px;
  123. opacity: 0.8;
  124. visibility: visible;
  125. }
  126. }
  127. }
  128. @mixin styleScrollH{
  129. &::-webkit-scrollbar {
  130. height: 3px;
  131. }
  132. &::-webkit-scrollbar-track {
  133. background:transparent;
  134. }
  135. &::-webkit-scrollbar-thumb {
  136. background-color: rgba(177, 163, 199, 0.5);
  137. border-radius:15px;
  138. background:transparent;
  139. }
  140. }
  141. @mixin styleScrollV{
  142. &::-webkit-scrollbar {
  143. width: 3px;
  144. }
  145. &::-webkit-scrollbar-track {
  146. background:transparent;
  147. }
  148. &::-webkit-scrollbar-thumb {
  149. background-color: rgba(177, 163, 199, 0.5);
  150. border-radius:15px;
  151. }
  152. }