Override new theme without !important

UI Components for JSF
Post Reply
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

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

Code: Select all

JSF 2.2
PrimeFaces 6.2.13
WildFly 13

PrimeFaces Core Developer
Posts: 3748
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE

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