Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @mixin wrap($prefix) {
- $selector: &;
- @at-root #{$prefix} {
- #{$selector} {
- @content;
- }
- }
- }
- @mixin ie9() {
- @include wrap($prefix: '.ie9') {
- @content;
- }
- }
- // This
- .a {
- .b {
- transform: translate3d(0, 0, 0);
- @include ie9 {
- transform: translate(0, 0);
- }
- }
- }
- // would compile to
- .a .b {
- transform: translate3d(0, 0, 0);
- }
- .ie9 .a .b {
- transform: translate(0, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement