Wiki source code of The XWiki Icon Set
Last modified by Eleni Cojocariu on 2026/08/25 16:24
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
![]() |
6.1 | 1 | XWiki supports one icon set, referred to in the documentation as //the XWiki Icon Set//. It is a list of icon names, and it is the abstraction that makes [[Icon Themes>>doc:documentation.xs.admin.icons.icon-themes.WebHome]] interchangeable: content, macros and code ask for a name, and the selected theme decides what is drawn. |
![]() |
1.1 | 2 | |
![]() |
7.1 | 3 | Every name of the Set, with the value each theme maps it to, is listed on the [[Icons page of the Developer Guide>>doc:Documentation.DevGuide.FrontendResources.Icons.WebHome]]. XWiki aims to keep an equivalent of every [[Silk>>doc:documentation.xs.admin.icons.icon-themes.silk.WebHome]] icon in each theme, so that content written before Icon Themes existed keeps rendering. |
![]() |
1.1 | 4 | |
![]() |
6.1 | 5 | == Icon naming convention == |
![]() |
1.1 | 6 | |
| 7 | In order to keep long term consistency on the icon names, a set of rules have been discussed. Those must be followed when introducing a new icon to the XWiki Icon Set. | ||
| 8 | |||
| 9 | * Use kebab-case. | ||
| 10 | * For composite icon names, the main noun is the first in the name. | ||
| 11 | * Remove hyphens from compound nouns. | ||
| 12 | |||
| 13 | Examples: | ||
| 14 | |||
![]() |
3.2 | 15 | * ##file-add## and not ##add-file## because the main noun is ##file## here ##add## is the action |
| 16 | * ##pdf-export## and not ##export-pdf## because the main noun is ##pdf## and ##export## is the action. | ||
| 17 | * ##bullet-black## and not ##black-bullet## because the main noun is ##bullet## and ##black## is an adjective | ||
| 18 | * ##emoticon-smile## and not ##smile-emoticon## because the main noun is ##emoticon## and ##smile## is a complementary noun. | ||
| 19 | * ##fastforward## is a compound noun from which we removed the hyphen. | ||
| 20 | * ##file-pdf## and not ##pdf-file## because in the meaning of this icon, the main meaning is ##file##, while ##pdf## only helps to refine the meaning. On the contrary, ##pdf-file## would mean that we want a ##file## variation on the main concept of ##pdf##. |

