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 *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)