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?
As of October 2021 @import will be deprecated, along with global built-in functions, and one year after that (no later than October 2022) @import support will be dropped. Make sure you go check out the newly refreshed Sass documentation for the latest updates.
It is now possible to import css files directly into your sass file. The following PR in github solves the issue. The syntax is the same as now - @import "your/path/to/the/file" , without an extension after the file name. This will import your file directly.
With (css) , the @import directive will remain as-is, and as a result the CSS file will be loaded by the browser at runtime ; with (inline) , the CSS file's contents are actually imported into the compiled stylesheet, which is what you want if that file is out of your web root for example.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With