less - How to compile bootstrap to get the same version as precompiled? -
i bought template. if try compile precompiled version of bootstrap fine.
@import "bootstrap.css"; //precompiled bootstrap @import "nifty/nifty.less"; //my theme
however, if compile bootstrap less variant, colors other expected:
@import "bootstrap/bootstrap.less"; //same version above, not precompiled @import "nifty/nifty.less"; //my theme
what difference. how should compile bootstrap, have exact same result precompiled variant in dist
folder in terms of colors?
i need this, because need compile template kendo ui , template provides not every theme variable need kendo ui bootstrap mapper.
this gulp task:
gulp.task('theme', function () { return gulp.src('./content/less/theme.less') .pipe(plumber()) .pipe(less({ paths: [path.join(__dirname, 'less', 'includes')] })) .pipe(gulp.dest('./content/theme')); });
there few possible issues here:
- you may not have equivalent bootstrap css , bootstrap less versions installed in project. ensure version listed @ top of bootstrap.css file same 1 @ top of bootstrap.less. cause - it's easy these out of step.
- ensure have recent gulp-less version. plugin had reported issues import handling in past have since been fixed.
- gulp-less may not respecting import 'order' - there have been problems reported in past. if issue, you're in bit of rough time. however, there's hackish solution can use if case: grab , render bootstrap library files directly gulp, output them css file in 'sources' (e.g. styles/lib/bootstrap), import outputted css file. absolute last resort - it's major, major hack.
- the template may include different version of bootstrap 1 have installed. check template see dependencies has.
Comments
Post a Comment