Adding LESS support would give access to variables and mixins for easier theme customization. Is there any opposition or argument against adding LESS support? If not, I'd like to help add this feature.

Comments

Docc’s picture

Draw me a picture here. Basicly you mean a UI for creating less?
Why not just include your own compiled css files or include less files with http://drupal.org/project/less

mjhale’s picture

Not creating a UI, just allowing people to include LESS files instead of CSS files. Allowing users to include Bootstrap's default LESS files to the library means they can import them to their custom theme LESS files in order to fully utilize what Bootstrap has to offer. Here are some example uses:

.#gradient > .horizontal()
.#translucent > .border()
#font > #family > .monospace()
and of course declaring your own @variables to override the default ones provided in Bootstrap

These all require the following imports in your theme's LESS file:
@import "twitter/bootstrap/variables";
@import "twitter/bootstrap/mixins";

Here is some more documentation on this: http://twitter.github.com/bootstrap/less.html

This may not be the best way of going about it, so any feedback + advice would be welcome.

Docc’s picture

Why put in all the effort if one just can compile its own less files into a custom bootstrap.css?

mjhale’s picture

Status: Active » Postponed

That's a good point. The proposed addition to this project would require the LESS Drupal library and might add unnecessary complexity in comparison to the number of users who may benefit or prefer the inclusion. If it's okay with you I'll mark this as postponed for now to see if anyone else would be in support of this or would like to add their comments.

Percept’s picture

This would indeed increase the complexity for some users but I don't see the point of converting this to a D7 theme if it doesn't support (subtheming with) LESS. The whole idea of twitter's bootstrap being built with LESS, is to use/override the variables, mixins, ...

If you can't do:

.my-block {
  .border-radius(4px);
}

there's really no point to it, is there?

Melissamcewen’s picture

Status: Postponed » Active

Has there been any work on this? I think this is important as if you use the default main fork of the Twitter Bootstrap project, it will not work with this module because of the LESS. Either it needs to work or it needs documentation for making it work.

Melissamcewen’s picture

maybe support an option to include less.js? this is an option in the Twitter Bootstrap documentation:

Javascript
Download the latest Less.js and include the path to it (and Bootstrap) in the <head>.

<link rel="stylesheet/less" href="/path/to/bootstrap.less">
<script src="/path/to/less.js"></script>

To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.

Melissamcewen’s picture

Issue summary: View changes

Updated wording