Conditional CSS for Edge and IE with breakpoints

Yesterday, I — unfortunately — had to write conditional CSS for IE and Edge… Both have problems with rendering my link :focus style in the new WordPress theme, so I had to create a fallback.

After discovering a CSS hack for addressing Edge per breakpoint in a post by Jeff Clayton, I also did not want a conditional comment solution for IE, but a breakpoint, too. Jeff for the rescue — he also has an article with IE CSS hacks.

That is the result:

/** * Conditional CSS for Edge 12+. * @link: https://jeffclayton.wordpress.com/2015/04/07/css-hacks-for-windows-10-and-spartan-browser-preview/ */ @supports (-ms-ime-align:auto) { /* Conditional Edge styles */ } /** * Conditional CSS for IE 8+ (and old Firefox 1.x). * @link: https://jeffclayton.wordpress.com/2015/04/07/css-hacks-for-windows-10-and-spartan-browser-preview/ */ @media screen\0 { /* Conditional IE styles */ }
Code language: CSS (css)

Leave a Reply

Your email address will not be published. Required fields are marked *