R
R
Ramil2015-07-08 10:55:05
css
Ramil, 2015-07-08 10:55:05

How to include css files in less file?

You just need to include the old css files in the unifying file less. Why then if I do

@import "styles.css";
@import "styles2.css";

Gives an error message:
[email protected]:~/Code/smartcrowd/public$ gulp less
[07:05:31] Using gulpfile ~/Code/public/gulpfile.js
[07:05:31] Starting 'less'...

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Broken @import declaration of "\url(../../../css/font-awesome.css\" Broken @import declaration of "\url(../../../css/bootstrap.css\" Broken @import declaration of "\url(../../../css/style.css\" Broken @import declaration of "\url(../../../css/media_queries.css\"

And if I connect only one css file, then all the rules pass and two give an error. What's the matter ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
potapovdmtriy, 2015-07-08
@vafarulez

try like this

@import "styles.less.css";
@import "styles2.less.css";

или так
@import (css) "styles.css";
@import (css) "styles2.css";

M
mishapsv, 2015-07-08
@mishapsv

I just change the css permission to less on the files themselves.

M
MrSunny, 2016-05-19
@MrSunny

It turned out to overcome the error only when changing files from css to less.
But I feel that some kind of crutch solution.
Does anyone know why gulp-less tries to take files from the ancestor folder (../some.css instead of some.css) with css files?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question