| 1 |
# OpenStation icons |
| 2 |
|
| 3 |
The eleven icons that are ours. Everything else the shell uses comes from |
| 4 |
WordPress: Core owns the verbs (save, search, trash, settings), OpenStation |
| 5 |
owns the nouns, the vocabulary that exists because this is a desktop and |
| 6 |
wp-admin is not. |
| 7 |
|
| 8 |
These are registered as the `openstation` collection in |
| 9 |
[](../../includes/wp-icon-registry.php`includes/wp-icon-registry.php`](../../includes/wp-icon-registry.php](../../includes/wp-icon-registry.php) and can |
| 10 |
be rendered anywhere with `wp_get_icon( 'openstation/window' )` on WordPress |
| 11 |
7.1 or newer. |
| 12 |
|
| 13 |
## Do not edit these by hand |
| 14 |
|
| 15 |
They are generated. The drawings live in the brand repository as 1.5 monoline |
| 16 |
strokes; these are the outlines of those strokes, expanded to filled paths. |
| 17 |
|
| 18 |
That is not a style choice. WordPress sanitises registered icon markup through |
| 19 |
`wp_kses` and keeps only `<svg>`, `<path>` and `<polygon>`, with no `stroke` |
| 20 |
attribute on any of them, so a monoline icon registered as drawn loses its |
| 21 |
stroke and renders as a solid blob. Expanding the stroke into a filled outline |
| 22 |
is what survives, and it looks identical: SVG scales stroke geometry with the |
| 23 |
shape either way. |
| 24 |
|
| 25 |
Two consequences worth knowing before editing anything here: |
| 26 |
|
| 27 |
- Every path carries `fill="currentColor"`. `wp_get_icon()` adds no fill, and a |
| 28 |
path without one paints black instead of following text color. |
| 29 |
- There is no `<title>`. It would be stripped. The accessible name comes from |
| 30 |
the `label` passed to `wp_register_icon()`, or from the button around it. |
| 31 |
|
| 32 |
## Not what the shell draws |
| 33 |
|
| 34 |
The desktop renders the same eleven from `src/ui/icons/`, and those are the |
| 35 |
monoline originals rather than these outlines. Nothing inside our own shadow |
| 36 |
roots passes through `wp_kses`, so there is no reason to hand the shell a |
| 37 |
flattened copy. Both are generated from the same brand sources, so they cannot |
| 38 |
drift; if you need an icon in TypeScript, import it from `src/ui/icons`. |
| 39 |
|
| 40 |
## License |
| 41 |
|
| 42 |
GPL-2.0-or-later, like the rest of the plugin. |
| 43 |
|