You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributor-docs/adding-icons.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,7 @@ order: 9
7
7
## Adding and Modifying Icons
8
8
9
9
- Use dashes in the name of the .svg files (e.g `calendar-month`).
10
-
Use the same name for the "line" and "solid" variants, and save them in the respective folder, e.g. `Solid/calendar-month` and `Line/calendar-month`.
11
-
12
-
- Copy the new icon files in the `/svg/Solid` and `/svg/Line` directories.
13
-
10
+
- Use the same name for the "Line" and "Solid" variants, and save them in the respective folder, e.g. `instructure-ui/packages/ui-icons/svg/Line/calendar-month.svg` and `instructure-ui/packages/ui-icons/svg/Solid/calendar-month.svg`.
14
11
- Double-check that the SVG size is 1920x1920.
15
12
16
13
```js
@@ -65,15 +62,11 @@ type: code
65
62
</svg>
66
63
```
67
64
68
-
- If the icon has to bidirectional (being mirrored in RTL mode, typically arrow icons), add the icon name to the bidirectional list in `packages/ui-icons/icons.config.js`. Deprecated icons are handled here as well.
69
-
70
-
- Run `npm run export:icons` from the repository root directory to generate the icons. This script will also take care of further optimizations on the SVG files (e.g. removing the `fill`s). The configs for this are located in `packages/ui-icons-build/lib/tasks/optimize-svgs/index.js` and `packages/ui-icons/svgo.config.js`.
71
-
72
-
- Run `npm install && npm run bootstrap`.
65
+
- If the icon has to be bidirectional (being mirrored in RTL mode, typically arrow icons), add the icon name to the bidirectional list in `packages/ui-icons/icons.config.js`. Deprecated icons are handled here as well.
73
66
74
-
-Finally, run `npm run dev` from the repository root directory to start the local server and check the generated output.
67
+
-Run `npm run bootstrap`.
75
68
76
-
-Verify icons display correctly by checking under [Icons](/#icons) in the main nav. Check all 3 versions (React, SVG and icon font).
69
+
-Finally, run `npm run dev` and verify that the icons are displayed correctly under [Icons](/#icons). Check all 3 versions (React, SVG and icon font).
77
70
78
71
(Note: The fonts are sometimes not rendered correctly, but we decided not to fix them, because they are not really used anywhere, and we might stop supporting icon fonts in the future in general.)
79
72
@@ -94,3 +87,9 @@ type: code
94
87
Draw inside the lines.
95
88
96
89
- Fill the space edge-to-edge as much as possible. The build process will add margins as needed.
0 commit comments