Jemt / Fit.UI

Fit.UI is a JavaScript based UI framework built on Object Oriented principles
http://fitui.org
GNU Lesser General Public License v3.0
19 stars 7 forks source link

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

Open Jemt opened 4 years ago

Jemt commented 4 years ago

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 commented 4 years ago

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!