Fórumok

How to exclude primefaces.css from portlet?

Fernando Cabrera, módosítva 9 év-val korábban

How to exclude primefaces.css from portlet?

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2014.08.01. Legújabb bejegyzések
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, módosítva 9 év-val korábban

RE: How to exclude primefaces.css from portlet?

Liferay Legend Bejegyzések: 14914 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
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.