Use custom theme in older version of primefaces.

Post Reply
josejim
Posts: 6
Joined: 20 Dec 2010, 23:54

08 Apr 2022, 01:50

Hello
My company has a project which uses primefaces 5.3 and cannot be upgraded to a newer version. But they need to use a custom theme made with the theme designer. The theme looks good, except for the icons. While researching I found out that I am missing the primeicons font. I tried to add it in several ways both in the theme and in the project without success.

Is there a way I can include primeicons?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

14 Apr 2022, 12:00

Hi,

Sorry for the delayed response! Do you just want to include primeicons in the project? If yes, you need to override some icon class after adding primeicons folders in your project.
Example for selectonemenu trigger icon;

Code: Select all

body .ui-icon {
    font-size: 1rem;
    display: inline-block;
    vertical-align: baseline;
    margin: 0;
    position: static;
    text-indent: 0;
    overflow: visible;
    background-repeat: no-repeat;
}

body .ui-selectonemenu .ui-selectonemenu-trigger .ui-icon {
    position: static;
    margin: 0;
    color: #6c757d;
    font-family: "primeicons" !important;
    font-style: normal;
    font-weight: normal;
    display: inline-block;
    background: none;
}

body .ui-selectonemenu .ui-selectonemenu-trigger .ui-icon:before {
    content: "\e902"; /* Primeicons code. Please check; https://github.com/primefaces/primeicons/blob/master/primeicons.css#L872 */
}

Post Reply

Return to “PrimeFaces Theme Designer API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests