Professional Documents
Culture Documents
name = RoboSmart
description = A responsive mobile-first layout for a corporate site.
version = VERSION
core = 7.x
stylesheets[all][] = css/style.css<
stylesheets[all][] = css/style.css
stylesheets[print][] = css/print.css
stylesheets[all and (min-width: 600px)][] = css/grid-600.css
stylesheets[all and (min-width: 600px)][] = css/style-600.css
stylesheets[all and (min-width: 480px)][] = css/style-480.css
stylesheets[all and (min-width: 960px)][] = css/style-960.css
stylesheets[all][] = css/fonts.css
5) Embed viewport & other mobile/handheld device specific meta tags in the
html.php.tpl file
Media Queries
CSS3 Media queries allow you to check media type and media features and conditionally
load style sheets. This is commonly used to distinguish between screen and print. The
media type print is used to define the printer friendly styles.
media print {
//embed print stylesheet
}
The below media query defines the style sheet for all media types. Also demonstrates the
use of the width media feature. Allows us to define styles for screen widths between
461px and 960px
@media all and (min-width: 461px) and (max-width: 900px) {
}
Media features are used to define the properties of the user agent. Some of the other
Media features include height, orientation and aspect-ratio.
The HandheldFriendly meta-tag was used initially by older Palm and Blackberry models.
<meta content="width=device-width" name="viewport"/>
Certain browser devices display the web pages by auto zooming. To override this auto
zoom feature for already optimized pages, the viewport meta tag is used. In our case the
width property is used. Here the width property is set to the viewport of the device. The
other viewport properties includes the initial-scale property which controls the zoom
level when the page is first loaded, the maximum-scale, minimum-scale, and userscalable properties which control how the user zooms in and out of the page. The
viewport meta tag is widely supported by modern smartphones and not limited to iOS,
and Android devices.
<meta http-equiv="cleartype" content="on"/>
Enables clear type for Windows mobile devices. For more details on the Mobile friendly
meta tags refer Mobile boilerplate at github. Mobile boiler plate is the best practice
baseline for your mobile web app. (https://github.com/h5bp/mobile-boilerplate )
Optimizing for IE
To enable IE support add Html5shiv, Respond.js and Selectivizr.js files to your theme.
What does html5shiv.js do?
IE9 supports html5 partly, IE8 and below do not support HTML5. The html5shiv.js uses
the document.createElement(tag) to create new elements and forces IE to render the
CSS styles to these generated HTML5 tags. (http://code.google.com/p/html5shiv)