Page 6 of 7

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:15
by king6887
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.

Code: Select all

<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>

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:16
by cagatay.civici
I've changed PF code to place theme.css after JSF-PF css, are you happy now?

Hope we are over this. ;)

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:17
by king6887
optimus.prime wrote:

Code: Select all

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.

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:17
by cagatay.civici
http://code.google.com/p/primefaces/sou ... ail?r=5477

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

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:17
by king6887
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

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:21
by cagatay.civici
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.

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:21
by cagatay.civici
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.

Re: theme is overriden by default css

Posted: 14 Sep 2011, 17:25
by cagatay.civici
To summarize what we have in RC1 at the moment is;

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

Re: theme is overriden by default css

Posted: 15 Sep 2011, 15:58
by anil
This is working great, thanks !!

Re: theme is overriden by default css

Posted: 15 Sep 2011, 16:29
by ltune
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