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: */ @supports (-ms-ime-align:auto) { /* Conditional Edge styles */ } /** * Conditional CSS for IE 8+ (and old Firefox 1.x). * @link: */ @media screen\0 { /* Conditional IE styles */ }
Code language: CSS (css)

Leave a Reply

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