17

I am trying to work with some grid widths using the bootstrap variables.less file, but I'd like to use SASS instead of LESS.

I've got the following code:

jqGrid.scss

@import url('../../Content/bootstrap/bootstrap-ui/less/variables.less');

@mixin colWidthPercent($columnNum, $widthPercent) {
    width: @screen-sm-min;
}

It doesn't like the @screen-sm-min, I'd assume because it's a LESS format.

Is there any way to mix a .less file and a .sass file?

mik01aj
  • 11,928
  • 15
  • 76
  • 119
Scottie
  • 11,050
  • 19
  • 68
  • 109

1 Answers1

22

No, that's not possible, because SASS and LESS aren't compatible with each other.

Just use the official SASS port of Bootstrap instead: https://github.com/twbs/bootstrap-sass

cvrebert
  • 9,075
  • 2
  • 38
  • 49
  • Would be nice to know, if they use some kind of conversion tool. (or all cinversion done by hand...?) – Frank N Jan 09 '17 at 13:15
  • 2
    @FrankNocke, Bootstrap 2 was manually converted to SCSS. For Bootstrap 3, they used `rake` to automatically convert LESS to SCSS. See ["Upstream Converter"](https://github.com/twbs/bootstrap-sass#upstream-converter) and it's [source code](https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb). Bootstrap 4 is written in SCSS only. – Philipp Bammes Oct 09 '18 at 14:18
  • 1
    Not sure why one developer said it was possible https://stackoverflow.com/a/5732683/185510 Edit: well he didn't say import, but at least they seem to have a parser – Andre Miras Sep 22 '21 at 05:54