background preloader

Common smartphones and tablets devices values

Common smartphones and tablets devices values

Viewport Device-Widths for Mobile Devices The following table list the pixel dimensions and viewport dimensions of several mobile devices. Focus is primarily on smartphones and tablets with high resolution screens; in particular, "retina" and "HD" mobile displays. Pixel dimensions are the physical hardware pixels count. * Click table header to sort column data Media queries - CSS | MDN Une media query (ou requête média) consiste en un type de média, et au moins une expression limitant la portée des déclarations CSS, en mettant à profit les particularités des supports multimédias comme leur largeur, leur hauteur ou leur affichage des couleurs. Ajouté dans CSS3, les media queries permettent d'adapter la présentation du contenu à une large gamme d'appareils sans changer le contenu lui-même. Syntaxe Les requêtes de média sont formées d'un type de média, et peuvent, d'après la spécification CSS3, contenir une ou plusieurs expressions, traitant des fonctionnalités du média, qui sont interprétées comme vraies ou fausses. Le résultat de la requête est vrai si le type de média indiqué correspond au type de périphérique sur lequel le document est affiché et que toutes les expressions dans la requête sont vraies. Lorsqu'une media query est vraie, la feuille de style ou les règles correspondantes sont appliquées selon les règles normales de la cascade. Opérateurs logiques and not only

Embedding Fonts in Epub Files The ability to embed fonts is a complex one and requires not only technical knowledge, but also legal knowledge and an understanding of device support. Before you produce an epub file for a device which supports embedded fonts, you should first consider using one of the fonts already built into the device. See the list of fonts included with each device. [edit] Method Epub2: (@font-face). The following font descriptors must be supported: font-family font-style font-variant font-weight font-size src For an example see: ePub Tutorial#Advanced formatting tasks Epub3: [edit] Device Support [edit] Embeddable Fonts: Free or Open Source See also Fonts#Fonts available for download [edit] Embeddable Fonts: Commercial [edit] Licensing Issues: What to look for in a font license

Standard CSS for Epub Files This page contains some standard CSS which is especially useful for ePub output. In general, this CSS works cross-platform and across devices. Listed are some typical formatting situations you will find in ebook production and the "standard" way to get things done. If there are device-specific hacks, they probably should be listed on the Device pages. Note that Kindle/Mobi format is different from ePub, and what is standard for Kindle may not apply to these CSS examples. Matt Harrison has put together a Epub CSS Starter Kit which includes a generic base css for epub files. See also: Table listing CSS properties and support on devices: [edit] Images [edit] Ebook Covers See Ebook_Covers [edit] Captions The best way to handle captions is to place them inside a div statement along with the image and then use the following: On some readers using page-break-inside:avoid may also work on the div grouping. [edit] Hyperlinks [edit] Widows and Orphans [edit] Centering and Justification [edit] Hyphenation

CSS HowTo A collection of hints and tips for formatting for ePubs using CSS. Because this page is aimed at ePubs, CSS listed here must conform to the official ePub spec for CSS and XHTML. [edit] Overview This page is not a tutorial on XHTML or CSS. [edit] Essentials HTML wasn't designed to create paged content. So there's one thing that should always be included in the CSS for an ePub. This ensures that the ebook takes up the entire allowed area provided by the reading software, and also (by setting the height attribute) enables some useful formatting tricks (see below). And then there's an optional item, that is almost always the right thing to have. This ensures that in paged output there's a margin all around the page. [edit] HR centered The following code will center a horizontal line that is 10% of the width of the page. [edit] Indenting a paragraph Standard paper books usually indent the paragraph start but they often treat the first paragraph in the chapter differently. [edit] Embedded fonts

CSS template Not all properties, such as those controlling widows and orphans, are supported by all eReaders at this time. [edit] Page Margin [edit] Images [edit] Links [Insert] a color value. [edit] Spans [edit] Front Matter [edit] Cover Page [edit] Title Page [edit] Colophon [edit] Table of Contents Only difference currently is level of margin above. [edit] Copyright Page Entry with or without space above. [edit] Market Copy [edit] Headings This is the default styling of all headings to deal with issues such as page breaks splitting headings and hyphenation issues. [edit] Base [edit] Parts or Chapters [edit] Text Headings [edit] Normal Text [edit] Page Break Woes I wrap this around h3, h4, h5 + first paragraph of text to keep together on some ereaders: [edit] Centered You may need to use the applebug span around these items for them to work on iBooks. [edit] Extract /* For extracts that represent text messages, computer text, etc..: */ /* For extracts that represent handwriting: */ [edit] Lists [edit] [edit] Tables

Le Web c’est pas en 72 dpi, coco! Pour fêter ma présence sur ce blog — youloulou, foule en liesse! — je vous propose de dézinguer un mythe du petit monde de l’informatique et du graphisme. Ce mythe dans sa plus simple expression: Le print c’est en 300 dpi, et pis le web c’est en 72 dpi. Et donc, ça c’est faux. Le Web n’est pas en 72 dpi (ou ppi ou pixels par pouce), et il n’est pas non plus en 96 dpi. Densité des pixels d’un écran: à vos calculettes! Petit exercice pratique: nous allons calculer ensemble la densité de pixels d’un écran. Sur cet écran, 1 mm correspond à un peu moins de 4 pixels.On aura un résultat différent sur d’autres écrans. Pour notre exercice, prenons par exemple l’écran de mon iMac (insérez ici un troll de votre choix). Sa diagonale est de 20 pouces (à peu près, c’est probablement une valeur arrondie).Sa définition native est de 1680 pixels en largeur, et 1050 en hauteur. Mon écran a une densité de pixels d’à peu près 99 pixels par pouce (99 ppi). Chaque écran est différent

Creating ePub files with Pages Creating an ePub Document to read in iBooks You can export any Pages word processing document to the ePub file format for reading in an ePub reader, such as the iBooks app for iOS or Mac. Documents created in page layout templates can’t be exported to the ePub format. Documents you export to ePub format will look different than their Pages counterparts. If you want to get the best document fidelity between the Pages and ePub formats, style your Pages document with paragraph styles and other formatting attributes allowed in an ePub file. To use the “ePub Best Practices” sample document To learn more about using the ePub format and get a better feel for how a Pages document might appear as an ePub file, it’s a good idea to download the “ePub Best Practices” sample document. Download the “ePub Best Practices” sample document. Preparing an existing Pages document for export to ePub format Documents you export to the ePub format automatically appear with page breaks before every chapter.

How to Use Media Queries in Responsive Web Design Photo credit: Jeremy Keith, Creative Commons Responsive web design has exploded in popularity — thanks to the need to create sites that work across numerous devices. However, responsive design comes with some problems of its own. The issue of slow-to-load sites is now well documented. Let’s walk through some of the tricks designers are using to better load content and images on different devices. Media Queries to Call Styles One of these tricks is the use of media queries, which work to call styles to the user device based on its dimensions. Call Using External Stylesheet or in a Stylesheet Like we described in the free e-book Mobile UI Patterns, media queries first check the media type against the user agent string before going on to check for the physical attributes of the viewport. For example, the external call would look like this: And the CSS direct call would look like this: 1 @media screen and (min-width:320px) 2 and (max-width:480px){ 3/*Insert your styles here As Ryan points out: