Update LESS to v1.3.0 #40

Closed
wants to merge 2 commits into
from

Projects

None yet
@Costo

Tested with Twitter Bootstrap v2.0.2, works great!

@Costo Costo Update LESS to v1.3.0
Tested with Twitter Bootstrap v2.0.2, works great!
ed2f6b2
@Costo

If you need this right now, you can replace the content of C:\Program Files (x86)\SimpLESS\Resources\js\less.js
with this version https://github.com/Costo/SimpLESS/blob/patch-1/Resources/js/less.js

Works on my machine!
Backup the file!

@Costo Costo referenced this pull request Mar 17, 2012
Closed

LESS 1.3.0 ? #39

@Costo

Ok there is actually a problem with Twitter Bootstrap.
In variables.less, these two variables:

// Sprite icons path
// -------------------------
@iconSpritePath:          "../img/glyphicons-halflings.png";
@iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";

When used in sprites.less:

.icon-white {
  background-image: url('@{iconWhiteSpritePath}');
}

The resulting CSS looks like this:

.icon-white {
  background-image: url('app://com.wearekiss.simpless.open/app://com.wearekiss.simpless.open/app://com.wearekiss.simpless.open/app://com.wearekiss.simpless.open/../img/glyphicons-halflings-white.png');
}
@gagarine

Did you try with the last version of bootstrap? I think they was a bug like that on their side.

@Costo

Yes I tested with Twitter Bootstrap v2.0.2.

@mbengtson

It seems to work if you remove the if-statement in less.js right after the comment "// Add the base path if the URL is relative and we are in the browser". Will that cause any problems?

if (typeof(window) !== 'undefined' && !/^(?:https?:\/\/|file:\/\/|data:|\/)/.test(val.value) && paths.length > 0) {
val.value = paths[0] + (val.value.charAt(0) === '/' ? val.value.slice(1) : val.value);
}

@gagarine

I will not hack the lib by removing this. But instead calling less.js properly. How less.js is used now? Why we don't use lessc?

We can also make a "delete windows;" right before calling this script.

delete window; doesn't seem to work. It is the root object, I don't think it can be deleted.
I think the simplest option is to comment out those lines.

@gagarine

How I get it now.. SimpleLess use Titanium Desktop so we really are in a browser.

So I agree removing those lines are certainly the best we can do.

@Paratron
Owner

less.js version 1.3 will be included within our next SimpLESS update which will be released somewhere around monday next week.
There will also be be an easy way for users to update the less.js in SimpLESS without having to wait again until we provide an update by ourselves.

@lhwparis

still no new version :(

@boast

still no new version :( (+one week)

@Paratron
Owner

Yes, sorry for that. We have currently all our coding power bound to some customer projects and cant spend any time on free stuff. Because of that, the SimpLESS update will have to wait.

Notheless I have created a quick fix a few days ago to help you guys out with a recent version of the less compiler at least (i mentioned it at twitter, you guys should follow us there -> @wearekiss ).

Download http://wearekiss.com/less.js and put it in the application under resources/lib/js/less.js (replace the old file).
After a restart of the SimpLESS app, you have less compiler 1.3 available.

Sorry guys for getting this late with the app update, maybe you are familiar with our problems. I currently wish that we have 26 hours a day ;)

@itproject

Great thanks! It works :)

@ingro

Hello, I don't know if it is caused by the new less.js but the annoying url bug (which insert "app://com.wearekiss.simpless.open/" before the proper url) is back :\

@wyqydsyq

Works perfectly, thanks! :D

@cghobbs

Any updates on this?

@mapb1990
background-image:url("app://com.wearekiss.simpless.open/app://com.wearekiss.simpless.open/../../less/app://com.wearekiss.simpless.open/app://com.wearekiss.simpless.open/../../less/../images/glyphicons-halflings.png");

Any updates on this?

@JakeWorrell

I can confirm that this works on both my MacBook Pro and my iMac at work. My Colleague has also confirmed this as working on Windows 7.

@slaur

@ingro, @mapb1990
I confirm URL bug was solved for me using the method provided by @Costo : b7c44bc

@ingro

Thank you for the info!

@Paratron
Owner

Fixed in 1.4

@Paratron Paratron closed this Jun 25, 2012
@silentworks

This is not fixed as I am still getting backrgound: url(''); with some relative path, I did as @slaur pointed out and that worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment