Skip to content

LESS (reference) for bootstrap not working as expected #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Amparose opened this issue Feb 20, 2014 · 10 comments
Closed

LESS (reference) for bootstrap not working as expected #34

Amparose opened this issue Feb 20, 2014 · 10 comments

Comments

@Amparose
Copy link

Importing a reference of bootstrap in its entirety results in cruft at the beginning of one's generated css:

@import (reference) "../bower_components/bootstrap/less/bootstrap";

The resulting css file should be empty.

I have tried this with grunt and it works as expected.

@yocontra
Copy link
Member

npm ls on your working grunt one, and your broken gulp one. There might be a less version difference

@Amparose
Copy link
Author

Good advise! gulp is [email protected] and grunt is [email protected] so that is weird if newer version is "broken". I will have to try and test just lessc and see if it returns the problem with latest version.

@yocontra
Copy link
Member

@Amparose Check the changelog for less and see if it broke something

@JosefJezek
Copy link

Any result?

@Amparose
Copy link
Author

Yes, so I just ran command-line less on a file that had only @import (reference) "bootstrap.less"; and the resulting css file was empty as expected.

So to me this indicates that it is a problem with this Gulp module.

Bootstrap v3.0.3

@yocontra
Copy link
Member

cc @stevelacy didn't you run into this earlier?

@stephenlacy
Copy link
Contributor

Yes, the changelog shows the new 'feature': https://github.com/less/less.js/blob/master/CHANGELOG.md#160

@Amparose What version of the CLI LESS did you use?
I am not sure about the 'problem with this gulp plugin' since it is using the less renderer, all options are passed to LESS:

less.render(str, opts, function (err, css) {
 // css is the rendered less
});

@Amparose
Copy link
Author

Which bit is the offending "feature" @stevelacy?

Ok the version of bootstrap I had in my Gulp-enabled project was different to the one I tested with LESSC (my bad). I just tried again with the exact files and get the same issue with LESS 1.6.3, LESS 1.7, and Bootstrap 3.1.1. So apologies, my previous comment (and initial post) was misinformed.

I guess I will reopen this issue with this test case.

@stephenlacy
Copy link
Contributor

Is this still an issue?

@yocontra
Copy link
Member

closing we are on less 2 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants