Exploring styling with Intel XDK - 2

In this post we take a look at media queries and how they enter styling in Intel XDK projects. Media queries came about in CSS3. In CSS2, the @media rule was introduced to address the different media types (desktop screens, printers, handheld etc). However this did not taek off except fro prit media type. Media queries look for the type of support or capability available on the device to tailor the styling. Media queries checks many things including display related variables like, Width and height of viewport Width and height of device Device Orientation (Landscape/portrait) Resolution Like anything else browser support is essential, typically the support for @media rule. Media query has the @media rule and the query syntax. The syntax of media query is: @media not|only mediatype and (expressions) { CSS-Code; } The result of the media query returns true if, The media type matches the type of device the document is beign displayed All ...