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.

Using clean-css v3.2.5, node.js 0.12.2 on Windows 7 64-bit:

cleancss --s0 --keep-line-breaks --compatibility ie8 1.css -o 2.css

source:

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px dashed;
  border-top: 4px solid\9;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

output:

.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\0;border-right:4px solid transparent;border-left:4px solid transparent}

\9 becomes \0.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vladimirsiljkoviccommented, Mar 9, 2017

Hi, thanks for the great library!

I think this fix has caused a side effect.

Both \0 and \9 can be used as a CSS hack to target different IE versions:

display: block\9; /* IE6-10 */
display: block\0; /* IE8-11 */

\0 in fact is a valid and working IE11 hack (it also affects IE8, IE9, and IE10), even if it’s not documented on BrowserHacks and it’s hardly documented anywhere. I don’t know any other CSS hack to target IE(11) without targeting Edge browser. I use it often, like so:

display: flex;
display: block\0; /* IE8-11 */

This is the output:

display:flex;display:block\9

As you can see \0 is replaced with \9, but display: block\9; won’t target IE11. Is there a reason why this is happening? Should this be fixed? Should I create a new issue for this?

Also, is there an option that I can turn off to stop replacing \0 with \9? For now, I’ve downgraded the version.

I’ve made a test case here http://jsbin.com/vowalixoku and you can test it in different IE version by pasting that URL here http://netrenderer.com/index.php

Thanks

0reactions
jakubpawlowiczcommented, Mar 22, 2017

Thanks for rechecking @vladimirsiljkovic - you can also turn on all IE8+ compatibility with compatibility: 'ie8'.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hackers are still finding - and using - flaws in Internet ...
The hackers delivered an IE exploit in an emailed Office document, which renders web content in IE even if it is not the...
Read more >
Google: State hackers still exploiting Internet Explorer zero- ...
The vulnerability (tracked as CVE-2022-41128) is due to a weakness in the JavaScript engine of Internet Explorer, which allows threat actors who ...
Read more >
North Korean hackers exploited Internet Explorer zero-day ...
North Korean hackers exploited a previously unknown zero-day vulnerability in Internet Explorer to target South Korean users with malware.
Read more >
Internet Explorer exploit is trouble even if you never use ...
Security researcher John Page has discovered a new security flaw that allows hackers to steal Windows users' data thanks to Internet Explorer.
Read more >
Internet Explorer security flaw allows hackers to steal files
Security researcher John Page has revealed an unpatched exploit in the web browser's handling of MHT files (IE's web archive format) that ...
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