Re: [mediaqueries] @media transform

On Wed, Oct 22, 2014 at 4:38 PM, Bogdan Brinza <bbrinza@microsoft.com> wrote:
> Hi,
>
> We've recently discovered a compatibility problem with Amazon that is reduced to detecting preserve-3d. They have an interesting detection in place in a form of snippet:
>
> @media(transform-3d),(-webkit-transform-3d) { #test3d { height: 3px }}
> Later in script they get the computed height of this element and test whether it is indeed 3px.
>
> Now the actual question, looking through the archives @media (transform) and few other have been debated here few times, most notably in discussion leading to @supports as far as I can tell in [1]. The original WebKit change I can track this to - is [2], happened in 2008-2009. There is a link to a spec [3] that leads to 404, so the only details I can extract are from the bug itself.
>
> We did few investigations on the usage on the web and it looks like @media (feature) is not really widely used - we found less than 50 instances on our collection of 600000+ sites, with more than half being this single wordpress plugin [4] and 25% - custom forks of legacy modernizr.
>
> Here is the actual question, looking at current media queries specs it looks @supports is now the way to achieve this functionality. @media (feature) looks like an old relic that should be considered deprecated, while there is still a chance that more sites didn't take dependency on it. What's WG opinion on this?

Yes, the (transform-3d) media feature was a custom extension by Apple
that was never proposed to the Working Group. @supports is how we do
testing for individual CSS features now.

~TJ

Received on Thursday, 23 October 2014 17:26:08 UTC