Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing \9 hacks in minified CSS. #1056

Closed
ghost opened this issue Dec 4, 2012 · 7 comments
Closed

Error parsing \9 hacks in minified CSS. #1056

ghost opened this issue Dec 4, 2012 · 7 comments

Comments

@ghost
Copy link

ghost commented Dec 4, 2012

hello, the parser doesn't seem to correctly handle the \9 IE hack. this file exhibits the problem:
https://github.com/TalksLab/metro-bootstrap/blob/master/css/metro-bootstrap.css
thanks in advance, sean.

@lukeapage
Copy link
Member

you can do ~"\9" or ~"\\9" (sorry forget which) to get the value into less.

your example is minified css which makes it difficult to work out what exactly you are referring to.

isn't the less already correct and working in the less folder (https://github.com/TalksLab/metro-bootstrap/tree/master/less) ?

@ghost
Copy link
Author

ghost commented Dec 7, 2012

thanks for your help. I was trying to avoid downloading all the less files but will either do that or escape the backslashes.

cheers,
sean

On Dec 5, 2012, at 6:44 AM, Luke Page [email protected] wrote:

you can do ~"\9" or ~"\9" (sorry forget which) to get the value into less.

your example is minified css which makes it difficult to work out what exactly you are referring to.

isn't the less already correct and working in the less folder (https://github.com/TalksLab/metro-bootstrap/tree/master/less) ?


Reply to this email directly or view it on GitHub.

@kriku
Copy link

kriku commented Oct 30, 2014

Luke, sry, but ~"\9" add hack with whitespace before it, so he don't work

@seven-phases-max
Copy link
Member

@kriku By now Less compiles statements like width: 100px\9; just fine, the only problem is it requires ; at the end (see #2207). Hence the problem in this issue: a minified CSS has no ;. Solution: do not use minified CSS files as Less sources.

As for the whitespace problem with ~"", you can put the whole value there e.g.:

width: ~"100px\9";

(Though yet again, escaping is not really necessary for \9 except some special cases).

@kriku
Copy link

kriku commented Oct 31, 2014

but if you want put some variable? something like

height: (@navbar-height - 1) ~"\9";

this code add whitespace after variable, like height: 49px \9; and this code dont work
and yes i just hardcode value

@seven-phases-max
Copy link
Member

but if you want put some variable?

@navbar-height: 33px;

.z {
    @height: (@navbar-height - 1);
    height: ~"@{height}\9";
}

@seven-phases-max seven-phases-max changed the title parse errors Error parsing \9 hacks in minified CSS. Oct 31, 2014
@kriku
Copy link

kriku commented Oct 31, 2014

Thanks! Really cool features! And helpfull community!

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

No branches or pull requests

3 participants