Override new theme without !important

UI Components for JSF
Post Reply
iMikeDeveloper
Posts: 15
Joined: 23 Aug 2018, 14:37

12 Jan 2019, 23:47

Hi guys


I'm using the new new-light theme and it's overlapping my styles.

I inspected the page and the new theme is at the end of the body while my style is in the head

I do not want to use! important because of hover, focus, good practice, etc.

Any solution?

Not Working:

Code: Select all

<h:body>
	<f:facet name="last">
		<h:outputStylesheet library="css" name="components.css"></h:outputStylesheet>
      		<h:outputStylesheet library="css" name="layout.css"></h:outputStylesheet>
	</f:facet>
	
	<!-- Hidden content -->
</h:body>

Code: Select all

 <context-param>
  	<param-name>primefaces.THEME</param-name>
  	<param-value>nova-light</param-value>
  </context-param>
  
Versions:
JSF 2.2
PrimeFaces 6.2.13
WildFly 13

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

14 Jan 2019, 11:06

If your css is loaded after the theme (you can verify this when you analyse the rendered head tag), thats probably because the selector used in the theme is more exact as yours.
Analyse the selectors via developer tools.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests