Foros de discusión

How to exclude primefaces.css from portlet?

Fernando Cabrera, modificado hace 9 años.

How to exclude primefaces.css from portlet?

Junior Member Mensajes: 47 Fecha de incorporación: 1/08/14 Mensajes recientes
Hello everyone!

I want to remove both css files from a primefaces portlet, primefaces.css and theme.css (by default primefaces-aristo)

Exclude theme.css it's simple with context-param in web.xml:

<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>none</param-value>
</context-param>


But I need help to exclude primefaces.css, this is the context of my situation:

I developed a custom theme with some css rules for primefaces components overriding ui classes. Then I developed a layout template with a primefaces portlet embedded. Themes CSS files are in header, but portlets CSS files are linked in HTML, therefore they have more priority because of the order in HTML page.

Exclude the files makes the work, but maybe there are some other solutions, like moving portlets css also to the header, or maybe another thing.

Any suggestions would be great.

Thanks!
thumbnail
David H Nebinger, modificado hace 9 años.

RE: How to exclude primefaces.css from portlet?

Liferay Legend Mensajes: 14914 Fecha de incorporación: 2/09/06 Mensajes recientes
How about a "patched" primefaces jar that has an empty css file? Allows everything else to be the same, all code continues to function, just won't be serving the overriding css styles.