Diffrence DotLess vs. LessCSS

200 views
Skip to first unread message

Richard Korebrits

unread,
Feb 10, 2012, 9:48:21 AM2/10/12
to DotLess (Less Css for .NET)
Hi There,

Why is the DotLess implementation of some things (in this case the
colour functions) different that the original LessCSS implementation?

For example in DotLess:
color: saturation(@base, 5%);

But in LessCSS:
color: saturate(@base, 5%);

In LessCSS 'saturation' "returns the `saturation` channel of @color".

In our environment we use less.js on development machines to parse
the .less files, but on the server they are parsed on build using
dotlesscss. So that's 2 diffrent versions which collide now. Why is
there any diffrence in the 2 in the first place?

Thanks!

Daniel Hölbling

unread,
Feb 10, 2012, 10:27:26 AM2/10/12
to dot...@googlegroups.com
We evolved that way.
Dotless implemented color functions when sass came out with them and
less adopted the a bit differently later.
But as far as I know we also support the less.js functions..

Greetings Daniel

Luke Page

unread,
Feb 11, 2012, 4:40:45 AM2/11/12
to dot...@googlegroups.com
Just checked and saturate works in both.

Maybe we should start giving a warning when people use saturation?
Though I'm not sure we have a mechanism for it.. I think we can only
raise exceptions to give messages to the caller.

Daniel Hölbling

unread,
Feb 11, 2012, 6:10:25 AM2/11/12
to dot...@googlegroups.com
I guess we should just patch the docs and tell people that we are also supporting the functions less.js has..
Because our docs do have a function reference, but only for our own functions.

greetings Daniel

Richard Korebrits

unread,
Feb 11, 2012, 6:23:33 AM2/11/12
to DotLess (Less Css for .NET)
In my particular case, I had the issue with darken(). This worked with
less.js, but with dotlesscss 1.2.2.0 (latest) it doesn't work.. That
when I discovered the differences between the 2 'frameworks'.

If you use either LessCSS or .LessCss it isn't really a problem,
because you can adapt. But unfortunately we use both because we don't
want to include the less.js file in our production environment, but we
also don't want to have to compile the .less with .lesscss on
development environment everytime there is a change... Dilemma...

On Feb 11, 1:10 pm, Daniel Hölbling <tigra...@tigraine.at> wrote:
> I guess we should just patch the docs and tell people that we are also
> supporting the functions less.js has..
> Because our docs do have a function reference, but only for our own
> functions.
>
> greetings Daniel
>
>
>
>
>
>
>
> On Sat, Feb 11, 2012 at 10:40 AM, Luke Page <luke.a.p...@gmail.com> wrote:
> > Just checked and saturate works in both.
>
> > Maybe we should start giving a warning when people use saturation?
> > Though I'm not sure we have a mechanism for it.. I think we can only
> > raise exceptions to give messages to the caller.
>
> > On 10 February 2012 15:27, Daniel Hölbling <hoelblin...@gmail.com> wrote:
> > > We evolved that way.
> > > Dotless implemented color functions when sass came out with them and
> > > less adopted the a bit differently later.
> > > But as far as I know we also support the less.js functions..
>
> > > Greetings Daniel
>

Luke Page

unread,
Feb 12, 2012, 8:44:33 AM2/12/12
to dot...@googlegroups.com
How were you trying to use it? We support darken...

P.s.

After plugins and the sprite generator plugin I plan to look at whats
been added to less.js in the last 4 months and move it to dotless...

Richard Korebrits

unread,
Feb 15, 2012, 3:57:47 AM2/15/12
to DotLess (Less Css for .NET)
I use it like this:

.gradientVerticalHover (@from, @to){
background: -webkit-linear-gradient(top, @from 0%,darken(@to, 7%)
100%);
}

And it comes out like:

background:-webkit-linear-gradient(top,#f7fef5
0,darken(#e1f9d4,7%) 100%);


This does work with less.js

Tnx!




On Feb 12, 3:44 pm, Luke Page <luke.a.p...@gmail.com> wrote:
> How were you trying to use it? We support darken...
>
> P.s.
>
> After plugins and the sprite generator plugin I plan to look at whats
> been added to less.js in the last 4 months and move it to dotless...
>

Daniel Hölbling

unread,
Feb 15, 2012, 5:20:13 AM2/15/12
to dot...@googlegroups.com
Have you tried without the 7%?

Luke Page

unread,
Feb 15, 2012, 6:47:52 AM2/15/12
to dot...@googlegroups.com
We support darken(color, 7%)..

https://github.com/dotless/dotless/blob/master/src/dotless.Test/Specs/Functions/LightnessFixture.cs

I think it might be a bug because of -webkit-linear-gradient.. I
suspect this might work around the problem..

gradientVerticalHover (@from, @to){
@colorTo: darken(@to, 7%);
background: -webkit-linear-gradient(top, @from 0%, @colorTo 100%);
}

But I'll look into it next time I have some more dotless time.

Luke Page

unread,
Feb 16, 2012, 7:56:54 AM2/16/12
to dot...@googlegroups.com
I've created unit tests for this and I can't get your exact example to
fail in the latest dotless.

This may have already been fixed.

Richard Korebrits

unread,
Feb 20, 2012, 3:25:46 AM2/20/12
to DotLess (Less Css for .NET)
Thanks guys, it seems to have been an issue with the Chirpy
implementation of dotlesscss. darken() seems to work now with the
latest source of that project, running dotlesscss 1.2.2.0
Reply all
Reply to author
Forward
0 new messages