Amazon Guidelines
Guidelines for self created
Guidelines for self created
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
8 Media Queries<br />
Publishing on Kindle: <strong>Guidelines</strong> for Publishers<br />
The new Kindle Format 8 (KF8) includes greater support for Cascading Style Sheets (CSS). Currently,<br />
Kindle Fire is the only KF8 compliant device, but <strong>Amazon</strong> will extend KF8 to current generation e Ink<br />
devices and apps as soon as possible.<br />
For devices without KF8 support, content creators may require more control over the Mobi 7 experience<br />
than provided by the standard conversions supported by KindleGen. To address this need, <strong>Amazon</strong> has<br />
implemented media queries as a way to apply the best CSS styles for each file format. This allows<br />
complex CSS formatting to be used for KF8 and more basic formatting to be used for the Mobi format.<br />
Media queries are part of the W3 standard. For more information, visit http://www.w3.org/TR/css3mediaqueries/<br />
Support for two new media types enables content creators to use specific CSS based on the Mobi or KF8<br />
file format: amzn-mobi and amzn-kf8.<br />
• For KF8 CSS styles, use the media query @media amzn-kf8. This is only applied for the KF8<br />
format.<br />
• For Mobi CSS styles, use the media query @media amzn-mobi. This is only applied for the<br />
Mobi format.<br />
The @media screen and @media all styles continue to apply to both KF8 and Mobi. If the media type<br />
is not amzn-mobi, amzn-kf8, screen, or all, Kindle ignores it.<br />
8.1 Using Media Queries<br />
The following table outlines examples of supported media queries and the CSS applied to KF8, Mobi, and<br />
other readers:<br />
Media Queries in CSS CSS Applied to KF8 CSS Applied to<br />
Mobi<br />
@media amzn-mobi<br />
-<br />
{<br />
font-<br />
.class1<br />
size:3em;<br />
{<br />
font-weight:<br />
font=size:3em;<br />
font-weight: bold;<br />
}<br />
}<br />
bold;<br />
.class1<br />
{<br />
font-style: italic;<br />
font-size:2em;<br />
}<br />
@media amzn-mobi<br />
{<br />
.class1<br />
{<br />
font-size:3em;<br />
font-weight: bold;<br />
}<br />
}<br />
font-style:<br />
italic;<br />
font-size: 2em;<br />
font-style:<br />
italic;<br />
font-size:<br />
3em;<br />
font-weight:<br />
bold;<br />
CSS Applied to<br />
Other Readers<br />
-<br />
font-style:<br />
italic;<br />
font-size:2em;<br />
Kindle Publishing <strong>Guidelines</strong> <strong>Amazon</strong>.com 37