Skip to main content

Icon Source

Icons are defined in the icons.png and [email protected] files for normal and high resolution displays respectively. Each PNG file is a sprite sheet that contains multiple icons, and the corresponding JSON manifest file (icons.json and [email protected]) defines the bounding boxes of each icon within the sprite sheet.

Here's a snippet of a JSON manifest:

{
"blue-fill": {
"height": 128,
"pixelRatio": 2,
"width": 128,
"x": 0,
"y": 0
},
"elevator-icon": {
"height": 48,
"pixelRatio": 2,
"width": 48,
"x": 256,
"y": 0
},
"icon-restroom": {
"height": 48,
"pixelRatio": 2,
"width": 48,
"x": 304,
"y": 0
},
// more icons...
}

Each entry in the JSON manifest represents an icon in the sprite sheet. The key is the icon's name, and the value is an object containing the icon's properties: width, height, x (the x-coordinate of the icon's upper-left corner in the sprite sheet), y (the y-coordinate), and pixelRatio (the ratio between pixels in the source image and display pixels; use 2 for high-resolution displays). The icon's size in the style is determined by its height and width in the sprite.