Dotless does honor not escaping strings

163 views
Skip to first unread message

Tustin2121

unread,
Aug 3, 2011, 5:11:01 PM8/3/11
to DotLess (Less Css for .NET)
According to http://lesscss.org/#-escaping , Less allows you to escape
a value that less wouldn't know what to do with by using a tilde-
string (~"example"). Dotless throws errors when it finds this, often
times allowing these values just plain. For example, lesscss expains:

Sometimes you might need to output a CSS value which is either not
valid CSS syntax, or uses propriatery syntax which LESS doesn’t
recognize.

To output such value, we place it inside a string prefixed with ~, for
example:

.class {
filter:
~"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png')";
}

This is called an “escaped value”, which will result in:

.class {
filter:
progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png');
}

However, dotless doesn't allow the ~"escaped string", only throwing an
error. (It also throws errors with the "filter" key, not allowing that
to be put into the output, but that's probably another bug.)

James Foster

unread,
Aug 4, 2011, 12:24:09 AM8/4/11
to dot...@googlegroups.com
Make sure your running the latest version!

Thanks

Sent from my iPhone

Tustin2121

unread,
Aug 4, 2011, 11:25:05 AM8/4/11
to DotLess (Less Css for .NET)
Ah heh... I am. Version 1.0.7ablahblahblah, the latest version
available for download at github, which was last uploaded four months
ago. Is there a *more* latest version somewhere, besides building it
straight from github (which is apparently impossible to do given that
I've tried about five different ways and come up with fatal build
errors every time)?

On Aug 4, 12:24 am, James Foster <james....@gmail.com> wrote:
> Make sure your running the latest version!
>
> Thanks
>
> Sent from my iPhone
>
> On 3 Aug 2011, at 22:11, Tustin2121 <tustin2...@gmail.com> wrote:
>
>
>
>
>
>
>
> > According tohttp://lesscss.org/#-escaping, Less allows you to escape
> > a value that less wouldn't know what to do with by using a tilde-
> > string (~"example"). Dotless throws errors when it finds this, often
> > times allowing these values just plain. For example, lesscss expains:
>
> > Sometimes you might need to output a CSS value which is either not
> > valid CSS syntax, or uses propriatery syntax which LESS doesn ft
> > recognize.
>
> > To output such value, we place it inside a string prefixed with ~, for
> > example:
>
> > .class {
> >  filter:
> > ~"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png')";
> > }
>
> > This is called an  gescaped value h, which will result in:

James Foster

unread,
Aug 4, 2011, 11:50:44 AM8/4/11
to dot...@googlegroups.com
Yeah there's a later version.

You need to use the build script to compile dotless (either NAnt or PowerShell) because it generates the AssemblyInfo.cs files.

@daniel could you upload the latest version to github? And NuGet if you can?

James

Sent from my iPhone

Daniel Hölbling

unread,
Aug 4, 2011, 1:29:49 PM8/4/11
to dot...@googlegroups.com
I guess it's time for a new release anyway..
I'll see about the NuGet - I don't really know how this works as I didn't build the first package.
But that shouldn't be a problem.

Going to do that tomorrow..Didn't set up any development environment at home yet..

greetings Daniel

Daniel Hölbling

unread,
Aug 5, 2011, 5:37:43 AM8/5/11
to dot...@googlegroups.com
New NuGet Version has been published (the v1.2 tag) and a new version has uploaded to github.
I guess we'll put out a 1.2.1 release next week with the stuff agatronic is currently doing and the bugfixes since 1.2

greetings Daniel

James Foster

unread,
Aug 5, 2011, 9:30:55 AM8/5/11
to dot...@googlegroups.com
That's great news.

Tustin2121

unread,
Aug 5, 2011, 2:25:13 PM8/5/11
to DotLess (Less Css for .NET)
Thanks for this. Though it doesn't really seem to help...

Actually, this is kind of interesting: this bug, as well as another
where string interpolation doesn't work, crop up when I include the
compiled dll in my project. However, if I download and include the
source project (dotless.Core) into my solution, all these bugs vanish
(and in fact, a another bug appears with comment spacing). Is there
something in the compilation process that might be causing this
strange behavior? Like a difference between Release and Debug perhaps?

On Aug 5, 5:37 am, Daniel Hölbling <tigra...@tigraine.at> wrote:
> New NuGet Version has been published (the v1.2 tag) and a new version has
> uploaded to github.
> I guess we'll put out a 1.2.1 release next week with the stuff agatronic is
> currently doing and the bugfixes since 1.2
>
> greetings Daniel
>
> On Thu, Aug 4, 2011 at 7:29 PM, Daniel Hölbling <tigra...@tigraine.at>wrote:
>
>
>
>
>
>
>
> > I guess it's time for a new release anyway..
> > I'll see about the NuGet - I don't really know how this works as I didn't
> > build the first package.
> > But that shouldn't be a problem.
>
> > Going to do that tomorrow..Didn't set up any development environment at
> > home yet..
>
> > greetings Daniel
>
> > Am 04.08.2011 um 17:50 schrieb James Foster:
>
> > > Yeah there's a later version.
>
> > > You need to use the build script to compile dotless (either NAnt or
> > PowerShell) because it generates the AssemblyInfo.cs files.
>
> > > @daniel could you upload the latest version to github? And NuGet if you
> > can?
>
> > > James
>
> > > Sent from my iPhone
>

Daniel Hölbling

unread,
Aug 5, 2011, 3:33:20 PM8/5/11
to dot...@googlegroups.com
What version exposes this problem?
As the last release 1.2 is not the most current one. (the code is
already ahead of 1.2 and once we get some final fixes well put out
1.2.1 next week)
I can send you the latest compiled dll that may incorporate the fix already.

Greetings Daniel

Luke Page

unread,
Aug 6, 2011, 3:37:44 AM8/6/11
to dot...@googlegroups.com

Could you raise the comment spacing bug you say you have from the latest?

Though bare in mind dotLess doesn't keep existing spaces outside of comments.. it either compresses it or (kind of) pretty prints it.

Tustin2121

unread,
Aug 8, 2011, 6:07:49 PM8/8/11
to DotLess (Less Css for .NET)
> Could you raise the comment spacing bug you say you have from the latest?
>
> Though bare in mind dotLess doesn't keep existing spaces outside of
> comments.. it either compresses it or (kind of) pretty prints it.
It is doing exactly that: It compresses the whitespace around the
comments (when not minified, which is what I'm using anyway, so it
really doesn't matter much).

On Aug 5, 3:33 pm, Daniel Hölbling <hoelblin...@gmail.com> wrote:
> What version exposes this problem?
> As the last release 1.2 is not the most current one. (the code is
> already ahead of 1.2 and once we get some final fixes well put out
> 1.2.1 next week)
> I can send you the latest compiled dll that may incorporate the fix already.
>
> Greetings Daniel

I forked the dotless/dotless project about a week ago and I have been
compiling a dll from that using NAnt. Doing this and including it in
my project as a library dll results in the following:
Less:
...
@imgdir: "/images";
...
li {
background: transparent url("@{imgdir}/nav_06.png") 100% 100% no-
repeat;
...
}
...
---------------------------------------------
Compiled CSS:
...
li {
background: transparent url("@{imgdir}/nav_06.png") 100% 100% no-
repeat;
...
}

----------------------------
However, including the dotless.Core project in my solution and giving
my project a dependency on it results in the same Less compiling to
this:
...
li {
background: transparent url("/images/nav_06.png") 100% 100% no-repeat;
...
}
----------------------------
Please note that all the NUnit tests in the dotless solution pass
every time I run them, including some I added that are a stripped down
version of my problem.

Tustin2121
Reply all
Reply to author
Forward
0 new messages