Board index JavaServer Faces General theme is overriden by default css

theme is overriden by default css

Components, Ajax Framework, Utilities and More.


Posts: 29
optimus.prime wrote:
Theme css is applied after structural css to an element like for spinner;

class="structural-css theme-css"

So although theme-css is loaded before on page load, it takes precedence.


I'm not angry, i'm just stating the obvious. See this statement here for an example ^

try that out, by your thinking, one of these should be red, the other should be blue. I can tell you now, they are both blue.

<html>
<head>
<style>
.theme{
 color: red;
}
.structural{
color: blue;
 }
</style>
</head>
<body>
<h2 class="theme structural">TEST EXAMPLE</h2>
<h2 class="structural theme">TEST EXAMPLE</h2>
</body>
</html>
Running PrimeFaces 3.0.M2 / 3.0.M4 using Mojarra-2.1.3 on Glassfish 3.1.1


Posts: 15036
Location: Cybertron

I've changed PF code to place theme.css after JSF-PF css, are you happy now?

Hope we are over this. ;)
PrimeFaces Lead


Posts: 29
optimus.prime wrote:
so i've added <h:outputStylesheet name="theme.css" library="primefaces-CustomTheme"/> to the end of my page template, and it works as expected now... Doesn't change the fact you have to call theme.css twice for it be rendered int he correct location, that is a pretty serious fault.


Well it is your serious fault because you are adding it twice to your page instead of following best practices.


Well i have to, since by default the theme.css is included above the pf-jsf css.

So i need to manually call it again, to get it to take priority.
Running PrimeFaces 3.0.M2 / 3.0.M4 using Mojarra-2.1.3 on Glassfish 3.1.1


Posts: 15036
Location: Cybertron

http://code.google.com/p/primefaces/sou ... ail?r=5477

I'm always open to discussions that contain respect to each other.
PrimeFaces Lead


Posts: 29
optimus.prime wrote:
I've changed PF code to place theme.css after JSF-PF css, are you happy now?

Hope we are over this. ;)


see i knew you'd see the light =D

Seriously though, thanks for that. I know i'm not the best at explaining things but i think we got there in the end. ^_^

edit: because i can't type correctly
Last edited by king6887 on 14 Sep 2011, 17:21, edited 1 time in total.
Running PrimeFaces 3.0.M2 / 3.0.M4 using Mojarra-2.1.3 on Glassfish 3.1.1


Posts: 15036
Location: Cybertron

Just checked, they are both blue yes, you are in that particular part, I'll give you that. Maybe it was IE when I tested it before or I'm getting older and recent browsers changed the behavior.

So can we close this discussion, I think we made progress.
PrimeFaces Lead


Posts: 15036
Location: Cybertron

Sorry if I sound a bit rough, I should not hang around in forum when I'm having a bad day ;)

Thanks for your feedback.

Wow 57 posts.
PrimeFaces Lead


Posts: 15036
Location: Cybertron

To summarize what we have in RC1 at the moment is;

http://blog.primefaces.org/?p=1433
PrimeFaces Lead


Posts: 35
This is working great, thanks !!


Posts: 125

OK, I see everybodies point here,

but i wonder if you could abandone "structural css" in favour for addition markup. Maybe you add some DTDs to check a Primefaces Theme against complaince in respect to Primefaces core? Would be nice to see PF in lynx or w3m, but I have troubles to stick to the toipic now :P

Good work here, and excelent illustration with the blue text. (Reminds me of "the Matrix")


Stay Tuned,

Adam
Busy applying primefaces patches to my local repo at /dev/null

PreviousNext

Return to General