diff --git a/images/icon-mask-android-circle.svg b/images/icon-mask-android-circle.svg new file mode 100644 index 000000000..e34713535 --- /dev/null +++ b/images/icon-mask-android-circle.svg @@ -0,0 +1,358 @@ + + + + + + + + + + + diff --git a/images/icon-mask-android-roundsquare.svg b/images/icon-mask-android-roundsquare.svg new file mode 100644 index 000000000..5c5f34052 --- /dev/null +++ b/images/icon-mask-android-roundsquare.svg @@ -0,0 +1,361 @@ + + + + + + + + + + + + + diff --git a/images/icon-mask-android-squircle.svg b/images/icon-mask-android-squircle.svg new file mode 100644 index 000000000..50e70d7dc --- /dev/null +++ b/images/icon-mask-android-squircle.svg @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + diff --git a/images/icon-mask-ios.svg b/images/icon-mask-ios.svg new file mode 100644 index 000000000..147d85b8f --- /dev/null +++ b/images/icon-mask-ios.svg @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + diff --git a/images/icon-mask-windows.svg b/images/icon-mask-windows.svg new file mode 100644 index 000000000..19a65ed92 --- /dev/null +++ b/images/icon-mask-windows.svg @@ -0,0 +1,356 @@ + + + + + + + + + + diff --git a/images/icon-plain.svg b/images/icon-plain.svg new file mode 100644 index 000000000..e55747123 --- /dev/null +++ b/images/icon-plain.svg @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/icon-safe-zone.svg b/images/icon-safe-zone.svg new file mode 100644 index 000000000..dca2a99e4 --- /dev/null +++ b/images/icon-safe-zone.svg @@ -0,0 +1,358 @@ + + + + + + + + + + + diff --git a/images/safe-zone.svg b/images/safe-zone.svg new file mode 100644 index 000000000..0bc3fbeb9 --- /dev/null +++ b/images/safe-zone.svg @@ -0,0 +1,4 @@ + + + + diff --git a/index.html b/index.html index 2aba490a4..de7edbfb8 100644 --- a/index.html +++ b/index.html @@ -70,6 +70,31 @@ caniuse: "web-app-manifest", }; +
@@ -2499,6 +2524,15 @@

A user agent can present this icon where space constraints and/or color requirements differ from those of the application icon. +
+ maskable: +
+
+ The image is designed with icon masks and safe + safe zone in mind, such that any part of the image that is + outside the safe zone can safely be ignored and masked + away by the user agent. +
any:
@@ -2570,6 +2604,151 @@

+
+

+ Icon masks and safe zone +

+

+ Some platforms have their own preferred icon shape, but as web + applications should work across multiple platforms, it is possible to + indicate that an icon can have a user-agent-specified mask applied by + adding the maskable purpose. This allows the platform to ensure + that the icon looks well integrated with the platform, and even apply + different masks and background colors in different places throughout + the platform. +

+

+ The safe zone is the area within a maskable icon + which is guaranteed to always be visible, regardless of user agent + preferences. It is defined as a circle with center point in the center + of the icon and with a radius of 2/5 (40%) of the icon size, which means + the smaller of the icon width and height, in case the icon is not + rectangular. +

+

+ Designers of maskable icons will want to make sure that all + important parts are within the safe zone. +

+
+ + +
+ The safe zone is a centrally positioned circle, with radius 2/5 + (40%) of the minimum of the icon's width and height. +
+
+

+ All pixels in this zone are guaranteed to be seen in all masks. + Pixels outside the safe zone are not guaranteed to (but can) be visible + depending on the applied mask. +

+

+ The user agent MAY apply a mask of any size, making any pixels that + are more than 2/5ths of the image size (minimum of width and height + if non-square) away from the center (the safe zone) + transparent. +

+

+ The user agent MUST NOT make any pixel within the safe zone + transparent. +

+

+ The user agent MAY enlarge the icon by adding additional padding. +

+

+ If the icon contains transparent pixels, the user agent MUST composite + the icon onto a solid color (eg. white) of the user agent's choice. +

+

+ It is suggested that designers avoid using transparent pixels in maskable + icons. +

+
+

+ Examples of masks +

+

+ By staying inside the safe zone, most icons will have around + 10% padding on the top, bottom, right and left with no content or + non-essential content, such as an icon background. + It is suggested that developers check their icon when all but the + safe zone is masked out. +

+

+ Icons with "maskable" purpose +

+
+
+ +
+ Image +
+
+ The base image with transparent background +
+
+
+ +
+ Safe zone +
+
+ Circle with radius 2/5 (40%) of the icon size +
+
+
+

+ Mask examples +

+
+
+ +
+ Rounded square +
+
+ Android +
+
+
+ +
+ Squircle +
+
+ Android +
+
+
+ +
+ Circle +
+
+ Android +
+
+
+ +
+ Rounded square +
+
+ iOS +
+
+
+ +
+ Fullbleed +
+
+ Windows +
+
+
+
+

sizes member @@ -3287,6 +3466,9 @@

Dave Raggett and Dominique Hazael-Massieux contributed to this specification via the HTML5Apps project.

+

+ Claudio Gomboli for icon example images. +