You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.
One thing CSS does that's really cool is (orientation: portrait) and (orientation: landscape) on @media queries. I use them when building full-screen animations with vmin and vmax units to ensure that stuff never goes outside the viewport and it's really handy to have that kind of information available - but I wish I could do the same on elements.
I grabbed the source code of EQCSS from http://elementqueries.com this weekend and added the following bit of JavaScript:
I do not know if it is valid, but in the case of window size, it would not be necessary to take the innerWidth / Height to know the screen size and not offset? To find the screen orientation.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
One thing CSS does that's really cool is
(orientation: portrait)
and(orientation: landscape)
on@media
queries. I use them when building full-screen animations withvmin
andvmax
units to ensure that stuff never goes outside the viewport and it's really handy to have that kind of information available - but I wish I could do the same on elements.I grabbed the source code of EQCSS from http://elementqueries.com this weekend and added the following bit of JavaScript:
And now syntax like this is supported on
@element
queries:So now this is working with EQCSS in all browsers IE8 and up. Here's a video of me testing this in IE8:
Code demos
I think it would be pretty cool if this was something normal CSS was aware of - I'll be able to put this to use right away!
The text was updated successfully, but these errors were encountered: