DEV Community


Discussion on: CSS With Feature Detection For Cross Browser Compatibility

turnerj profile image
James Turner

One thing I found recently was a site called Browser Strangeness which gives examples of how to target specific browsers in pure CSS in cases where @supports doesn't work (eg. if the browser supports it but it is a buggy implementation).

For example:

_:-ms-input-placeholder, :root .selector { property:value; }

That selector only works properly for IE10 and IE11 according to the site.

I'm not saying this is a terribly good solution, it really is a hacky (and prone to breaking) way of doing it but I thought it was really clever. For a personal site of mine, I actually am using a few selectors from Browser Strangeness because I didn't want to use JS.

Forem Open with the Forem app