question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

less escaping seems to be broken

See original GitHub issue

There is a problem with grunt-recess in that less escaping seems to be broken. See: https://github.com/twitter/recess/issues/59

In summary, using the .less file below

.carousel-inner {
  width: 83%;
  width: ~"calc(100% - 71px)";
  width: ~"-webkit-calc(100% - 71px)";
  width: -moz-calc(~"100% - 71px");
  width: -o-calc(~"100% - 71px");
}

results in css:

.carousel-inner {
  width: 83%;
  width: calc(29%);
  width: -webkit-calc(29%);
  width: -moz-calc(29%);
  width: -o-calc(29%);
}

less should however “pass through” all the parts escaped by ~“”

This is the wrong place to request a fix for this bug, but was there any reason behind the design choice of using grunt-recess vs. grunt-contrib-less? I’m thinking of switching my local copy of ng-boilerplate to use grunt-contrib-less and submitting a PR.

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
iulianmihaicommented, Sep 11, 2015

For everyone who is interested, I found the following solution:

height: ~"(calc(~'100%' - ~'116px'))";

output:

height: calc(100% - 116px);

The reason I’m not using grunt-contrib-less is because I can not import less files in other less files.

0reactions
Marlywooscommented, Apr 15, 2016

@iulianmihai Your solution is perfect! Tks

Read more comments on GitHub >

github_iconTop Results From Across the Web

less(1) - Linux manual page - man7.org
You can make less think that characters other than "m" can end ANSI color escape sequences by setting the environment variable LESSANSIENDCHARS to...
Read more >
Escape The Fate - Broken Heart (Official Video) - YouTube
Escape The Fate - Broken Heart (Official Video).
Read more >
Broken Heart - YouTube
Provided to YouTube by Eleven Seven Music Broken Heart · Escape The Fate … Show more. Show more. Show less. Comments. 63. Add...
Read more >
Escaping the Matrix: 8 Ways to Deprogram Yourself
1. Break free the shackles of organized religion · 2. Stop giving your power away to external authority · 3. Question the dominant...
Read more >
Feeling Trapped? 15 Ways to Escape The Life You Have
Feeling trapped is one of the worst situations to be in. But there are solutions. Here's 13 different ways to escape this feeling....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found