on-media-query icon indicating copy to clipboard operation
on-media-query copied to clipboard

Doesn't seem to work in Opera (or Opera Mobile)

Open thany opened this issue 11 years ago • 1 comments

It works in neither Opera on the desktop, Opera Mobile (different one), or Opera Mobile on desktop (oh yeah, there's that too).

Quite possibly, because finding the font-family for the html element in Opera always returns the resolved font-family, and a family like "small" or "medium", as is common practise in this scenario, doesn't exist and reverts to whatever font is default for the browser. In Android that would be Roboto, on desktop (Windows) its Times New Roman.

Is there a way to tell Opera to fetch the declared font-family for an element? Then that would fix it for Opera (for desktop / for Android / Mobile).

/edit Removed mentioning Opera for Android. Works fine there.

thany avatar Jun 25 '13 13:06 thany

I think this fork https://github.com/registerguard/js-media-queries works on opera. I think it works because it tries using both the font-family and pseudo content.

So for this repo to support opera it would have to take a similar approach.

codekipple avatar Sep 10 '13 08:09 codekipple