index.scss 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. $a: purple;
  2. $b: skyblue !default;
  3. $c: 2px solid #f00;
  4. // @import url(demo.css);
  5. @import "./demo.scss";
  6. @mixin sun {
  7. width: 500px;
  8. height: 500px;
  9. }
  10. // var aa = xxx;
  11. /*
  12. var aa = xxx1;
  13. */
  14. @mixin rain($f) {
  15. font-size: $f;
  16. }
  17. @mixin snow($g:20px) {
  18. border-radius: $g;
  19. }
  20. // @mixin cloudy($h,$i,$j,$k) {
  21. // box-shadow: $h $i $j $k;
  22. // }
  23. @mixin cloudy($h...) {
  24. box-shadow: $h;
  25. }
  26. %hi {
  27. font-size: 30px;
  28. }
  29. .happy {
  30. cursor: pointer;
  31. }
  32. @function flower($x) {
  33. @return $x * 2;
  34. }
  35. .box {
  36. border: $c;
  37. $d: red !global;
  38. @include sun;
  39. @include snow();
  40. @include cloudy(10px 50px 15px yellow);
  41. h1 {
  42. // color: $a !important;
  43. color: $b;
  44. color: $d;
  45. // font-size: 50px;
  46. // font-style: italic;
  47. // font-weight: 300;
  48. font: {
  49. size: #{flower(12)}px;
  50. style: italic;
  51. weight: 300;
  52. }
  53. }
  54. ul {
  55. width: (1000px/4);
  56. background-color:#f00 + #0f0;
  57. border: $c;
  58. li {
  59. color: $d;
  60. // @extend .happy;
  61. @include rain(20px);
  62. &:hover {
  63. color: $a;
  64. // @extend %hi;
  65. }
  66. }
  67. }
  68. }