theme is overriden by default css

UI Components for JSF
Locked
king6887
Posts: 29
Joined: 11 Jul 2011, 12:04

14 Sep 2011, 17:15

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>
Running PrimeFaces 3.0.M2 / 3.0.M4 using Mojarra-2.1.3 on Glassfish 3.1.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Sep 2011, 17:16

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

Hope we are over this. ;)

king6887
Posts: 29
Joined: 11 Jul 2011, 12:04

14 Sep 2011, 17:17

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.
Running PrimeFaces 3.0.M2 / 3.0.M4 using Mojarra-2.1.3 on Glassfish 3.1.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Sep 2011, 17:17

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

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

king6887
Posts: 29
Joined: 11 Jul 2011, 12:04

14 Sep 2011, 17:17

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Sep 2011, 17:21

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.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Sep 2011, 17:21

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.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Sep 2011, 17:25

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

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

anil
Posts: 38
Joined: 10 Jan 2010, 06:08

15 Sep 2011, 15:58

This is working great, thanks !!

ltune
Posts: 125
Joined: 20 Jul 2011, 20:25
Contact:

15 Sep 2011, 16:29

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

Locked

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests