function.scss 613 B

1234567891011121314151617181920212223242526272829
  1. @mixin clearfix {
  2. *zoom: 1;
  3. &:before, &:after {
  4. display:table;
  5. content:"";
  6. }
  7. &:after {
  8. clear: both;
  9. height: 0;
  10. visibility: hidden;
  11. }
  12. }
  13. @mixin at2x($path, $ext: "png", $w: auto, $h: auto) {
  14. background-image: url("../images/#{$path}.#{$ext}");
  15. background-repeat: no-repeat;
  16. background-size: $w $h;
  17. @media all and (-webkit-min-device-pixel-ratio : 1.5),
  18. all and (-o-min-device-pixel-ratio: 3/2),
  19. all and (min--moz-device-pixel-ratio: 1.5),
  20. all and (min-device-pixel-ratio: 1.5) {
  21. background-image: url("../images/#{$path}@2x.#{$ext}");
  22. background-size: $w $h;
  23. }
  24. }