Skip to content

Commit 3e6ce9c

Browse files
committed
Add a remark about the conversion of CSS based icons
Closes #336
1 parent 07bb596 commit 3e6ce9c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/migration/wsc55/icons.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,15 @@ This can be replaced using a proper button element which also provides proper ac
148148
</li>
149149
```
150150

151+
### Replacing Icons in CSS
152+
153+
Icons created through CSS properties are generally not supported.
154+
It was often used as a convenient way to introduce a new icon with little hassle, but has way too many downsides, including but not limited to accessibility.
155+
156+
Existing icons injected through CSS properties are dysfunctional and must be converted into regular icons that are injected into the DOM.
157+
If you cannot embed them directly in the template, you should inject those using JavaScript on runtime.
158+
It is possible to inject icons using JavaScript on page load by relying entierly on native JavaScript, because the icon component is eagerly loaded ahead of time, preventing any flicker or layout shifts.
159+
151160
### Migrating Admin-Configurable Icons
152161

153162
If admin-configurable icon names (e.g. created by [`IconFormField`](../../php/api/form_builder/form_fields.md#iconformfield)) are stored within the database, these need to be migrated with an [upgrade script](../../package/pip/script.md).

0 commit comments

Comments
 (0)