Skip to content

Commit 71ca9fb

Browse files
drublicmathiasbynens
authored andcommitted
Use one apple-touch-icon instead of six
This commit removes five Apple Touch Icons with different sizes for the same icon and adds a new icon `apple-touch-icon-precomposed.png` with a resolution of 152×152px. Apart from that it adds documentation on how to add more icons if you need them within your project. Using only one Apple Touch Icon saves time and is enough in most cases. Closes #1367. Closes #1425.
1 parent 23f5e08 commit 71ca9fb

10 files changed

+44
-16
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### HEAD
22

3+
* Use one apple-touch-icon instead of six ([#1367](https://github.com/h5bp/html5-boilerplate/issues/1367))
34
* Move font-related declarations from `body` to `html` ([#1411](https://github.com/h5bp/html5-boilerplate/issues/1411)).
45
* Update to Apache Server Configs 1.1.0.
56
* Vertical centering for audio-, canvas- and video-tags ([#1326](https://github.com/h5bp/html5-boilerplate/issues/1326)).
-751 Bytes
Binary file not shown.
-939 Bytes
Binary file not shown.
-450 Bytes
Binary file not shown.
-512 Bytes
Binary file not shown.

apple-touch-icon-precomposed.png

776 Bytes
Loading

apple-touch-icon.png

-450 Bytes
Binary file not shown.

doc/extend.md

+28
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,34 @@ Home Screen icon. This works since iOS 6.
516516
For further information please read the [official documentation](http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html)
517517
on Apple's site.
518518

519+
### Apple Touch Icons
520+
521+
Touch Icons can be seen as the favicons of mobile devices and tablets.
522+
523+
If your site or icons are in a sub-directory, you will need to reference the
524+
icons using `link` elements placed in the HTML `head` of your document.
525+
526+
```html
527+
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
528+
```
529+
530+
The main sizes of the icons on iOS are:
531+
532+
* iPad, high-resolution display, iOS 7: 152x152
533+
* iPad, high-resolution display, iOS ≤ 6: 144x144
534+
* iPhone, high-resolution display, iOS 7: 120x120
535+
* iPhone, high-resolution display, iOS ≤ 6: 114x114
536+
* iPad, non-Retina, iOS ≤ 6: 72x72
537+
538+
For non-Retina iPhone, iPod Touch, and Android 2.1+ devices you can use the
539+
example from above or replace the `apple-touch-icon-precomposed.png` within this
540+
project's root folder.
541+
542+
Please refer to Mathias' [article on Touch
543+
Icons](http://mathiasbynens.be/notes/touch-icons) for a comprehensive overview.
544+
545+
### Apple Touch Startup Image
546+
519547
Apart from that it is possible to add start-up screens for web apps on iOS. This
520548
basically works by defining `apple-touch-startup-image` with an according link
521549
to the image. Since iOS devices have different screen resolutions it is

doc/html.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,14 @@ a simple setup that strikes a good balance for general use cases.
9191
<meta name="viewport" content="width=device-width, initial-scale=1">
9292
```
9393

94-
## Favicons and Touch Icons
94+
## Favicons and Touch Icon
9595

9696
The shortcut icons should be put in the root directory of your site. HTML5
97-
Boilerplate comes with a default set of icons (include favicon and Apple Touch
98-
Icons) that you can use as a baseline to create your own.
99-
100-
If your site or icons are in a sub-directory, you will need to reference the
101-
icons using `link` elements placed in the HTML `head` of your document.
102-
103-
For a comprehensive overview, please read [Everything you always wanted to know
104-
about touch icons](http://mathiasbynens.be/notes/touch-icons) by Mathias
105-
Bynens.
97+
Boilerplate comes with a default set of icons (include favicon and one Apple
98+
Touch Icon) that you can use as a baseline to create your own.
10699

100+
Please refer to the more detailed description in the [Extend section](extend.md)
101+
of these docs.
107102

108103
## Modernizr
109104

doc/usage.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ A basic HTML5 Boilerplate site initially looks something like this:
3434
│ └── modernizr.min.js
3535
├── .htaccess
3636
├── 404.html
37+
├── apple-touch-icon-precomposed.png
3738
├── index.html
3839
├── humans.txt
3940
├── robots.txt
4041
├── crossdomain.xml
41-
├── favicon.ico
42-
└── [apple-touch-icons]
42+
└── favicon.ico
4343
```
4444

4545
What follows is a general overview of each major part and how to use them.
@@ -101,9 +101,13 @@ Edit this file to include any pages you need hidden from search engines.
101101
A template for working with cross-domain requests. [About
102102
crossdomain.xml](crossdomain.md).
103103

104-
### icons
104+
### Icons
105105

106-
Replace the default `favicon.ico` and apple touch icons with your own. You
107-
might want to check out Hans Christian's handy [HTML5 Boilerplate Favicon and
108-
Apple Touch Icon
106+
Replace the default `favicon.ico` and Apple Touch Icon with your own.
107+
108+
If you want to use different Apple Touch Icons for different resolutions please
109+
refer to the [according documentation](extend.md#apple-touch-icons).
110+
111+
You might want to check out Hans' handy [HTML5 Boilerplate Favicon and Apple
112+
Touch Icon
109113
PSD-Template](http://drublic.de/blog/html5-boilerplate-favicons-psd-template/).

0 commit comments

Comments
 (0)