mixin.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <<<<<<< HEAD
  2. @mixin clearfix {
  3. &:after {
  4. content: "";
  5. display: table;
  6. clear: both;
  7. }
  8. }
  9. @mixin scrollBar {
  10. &::-webkit-scrollbar-track-piece {
  11. background: #d3dce6;
  12. }
  13. &::-webkit-scrollbar {
  14. width: 6px;
  15. }
  16. &::-webkit-scrollbar-thumb {
  17. background: #99a9bf;
  18. border-radius: 20px;
  19. }
  20. }
  21. @mixin relative {
  22. position: relative;
  23. width: 100%;
  24. height: 100%;
  25. }
  26. @mixin pct($pct) {
  27. width: #{$pct};
  28. position: relative;
  29. margin: 0 auto;
  30. }
  31. @mixin triangle($width, $height, $color, $direction) {
  32. $width: $width/2;
  33. $color-border-style: $height solid $color;
  34. $transparent-border-style: $width solid transparent;
  35. height: 0;
  36. width: 0;
  37. @if $direction==up {
  38. border-bottom: $color-border-style;
  39. border-left: $transparent-border-style;
  40. border-right: $transparent-border-style;
  41. }
  42. @else if $direction==right {
  43. border-left: $color-border-style;
  44. border-top: $transparent-border-style;
  45. border-bottom: $transparent-border-style;
  46. }
  47. @else if $direction==down {
  48. border-top: $color-border-style;
  49. border-left: $transparent-border-style;
  50. border-right: $transparent-border-style;
  51. }
  52. @else if $direction==left {
  53. border-right: $color-border-style;
  54. border-top: $transparent-border-style;
  55. border-bottom: $transparent-border-style;
  56. }
  57. }
  58. =======
  59. @mixin clearfix {
  60. &:after {
  61. content: "";
  62. display: table;
  63. clear: both;
  64. }
  65. }
  66. @mixin scrollBar {
  67. &::-webkit-scrollbar-track-piece {
  68. background: #d3dce6;
  69. }
  70. &::-webkit-scrollbar {
  71. width: 6px;
  72. }
  73. &::-webkit-scrollbar-thumb {
  74. background: #99a9bf;
  75. border-radius: 20px;
  76. }
  77. }
  78. @mixin relative {
  79. position: relative;
  80. width: 100%;
  81. height: 100%;
  82. }
  83. @mixin pct($pct) {
  84. width: #{$pct};
  85. position: relative;
  86. margin: 0 auto;
  87. }
  88. @mixin triangle($width, $height, $color, $direction) {
  89. $width: $width/2;
  90. $color-border-style: $height solid $color;
  91. $transparent-border-style: $width solid transparent;
  92. height: 0;
  93. width: 0;
  94. @if $direction==up {
  95. border-bottom: $color-border-style;
  96. border-left: $transparent-border-style;
  97. border-right: $transparent-border-style;
  98. }
  99. @else if $direction==right {
  100. border-left: $color-border-style;
  101. border-top: $transparent-border-style;
  102. border-bottom: $transparent-border-style;
  103. }
  104. @else if $direction==down {
  105. border-top: $color-border-style;
  106. border-left: $transparent-border-style;
  107. border-right: $transparent-border-style;
  108. }
  109. @else if $direction==left {
  110. border-right: $color-border-style;
  111. border-top: $transparent-border-style;
  112. border-bottom: $transparent-border-style;
  113. }
  114. }
  115. >>>>>>> ec6eeb00ce64eb587a455406167d302dc3e59216