Fit.UI icon indicating copy to clipboard operation
Fit.UI copied to clipboard

IE10 and IE11 picking up on IE8/IE9 specific CSS hacks

Open Jemt opened this issue 5 years ago • 1 comments

Internet Explorer still has ~6% market share, and probably more in larger organisations, so this might still be relevant.

IE10 and IE11 picks up on CSS hacks targeted for IE9 and below using \9 - example: min-height: 0\9;

These hacks are unreliable, ugly, and might break CSS minifiers and bundlers, so we should get rid of them. It seems acceptable to register data-ie-browser="nn" where nn is the version number.

This allows us to target IE like so:

div.FitUiControl[data-ie-browser]
{
    /* Targets ALL versions of IE */
}

div.FitUiControl[data-ie-browser="8"]
{
    /* Targets only IE8 */
}

div.FitUiControl[data-ie-browser="8"],
div.FitUiControl[data-ie-browser="9"]
{
    /* Targets IE8 and IE9 */
}

Jemt avatar Sep 03 '20 10:09 Jemt

WARNING: Resolving this issue and making sure IE8/9 hacks are no longer applied to IE10 and IE11, would invalidate all prior testing done on IE10/11. We need to test everything again in these browsers!

Jemt avatar Sep 03 '20 10:09 Jemt