I ended this CSS bit for a DataTable :
.ui-datatable .ui-sortable-column-icon.ui-icon { background-image: none; text-indent: 0; margin: 0 0 0 .5em; } .ui-paginator > span:before, .ui-sortable-column-icon:before { font-family: FontAwesome; color: #fff; } .ui-paginator > span > span, .ui-paginator a span { display: none; } .ui-paginator-first:before { content: '\f049'; } .ui-paginator-prev:before { content: '\f048'; } .ui-paginator-next:before { content: '\f051'; } .ui-paginator-last:before { content: '\f050'; } .ui-icon-carat-2-ns:before { content: '\f0dc'; } .ui-icon-carat-2-ns.ui-icon-triangle-1-n:before { content: '\f0de'; } .ui-icon-carat-2-ns.ui-icon-triangle-1-s:before { content: '\f0dd'; } .ui-paginator .ui-state-disabled { opacity: .25; }
All Unicode can be found here: http://fontawesome.io/cheatsheet/
The Awesome font offers several alternative icons:
- ο
fa-sort-alpha-asc
\f15d - ο
fa-sort-alpha-desc
\f15e - ο
fa-sort-amount-asc
\f160 - ο
‘ fa-sort-amount-desc
\f161 - ο
’ fa-sort-numeric-asc
\f162 - ο
£ fa-sort-numeric-desc
\f163
Update
After doing CSS overrides for my theme and taking into account Kukeltje's comments, I decided it would be nice to add the JSF ResourceHandler to the theme I'm working on .
Just add a dependency to your project and add a resource handler
<application> <resource-handler>org.jepsar.primefaces.theme.jepsar.FontAwesomeResourceHandler</resource-handler> </application>
The handler will detect PrimeFaces themes and fix CSS. It removes the jQuery user interface icons and adds the Awesome rules Font (which includes a separate SCSS Icon Display ).
source share