0

For some reason, Sass's division is not working.

@mixin tabs($num-of-tabs) {
  .slide {
    width:(100% / #{$num-of-tabs});
    width: calc(100% / #{$num-of-tabs});
  }
}

I want to set the width without using calc and then with it. This is for an IE10 fallback.

But it doesn't compile the way I'd expect.

The CSS it outputs is

.slide-demo {
  width: 100%/3;
  width: calc(100% / 3); 
}

I need it to output 33.33% for the width, not 100%/3, which CSS cannot understand.

mildrenben
  • 3,675
  • 5
  • 23
  • 37

0 Answers0