Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. @mixin wrap($prefix) {
  2. $selector: &;
  3.  
  4. @at-root #{$prefix} {
  5. #{$selector} {
  6. @content;
  7. }
  8. }
  9. }
  10.  
  11. @mixin ie9() {
  12. @include wrap($prefix: '.ie9') {
  13. @content;
  14. }
  15. }
  16.  
  17. // This
  18. .a {
  19. .b {
  20. transform: translate3d(0, 0, 0);
  21.  
  22. @include ie9 {
  23. transform: translate(0, 0);
  24. }
  25. }
  26. }
  27.  
  28. // would compile to
  29. .a .b {
  30. transform: translate3d(0, 0, 0);
  31. }
  32.  
  33. .ie9 .a .b {
  34. transform: translate(0, 0);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement