theme is overriden by default css

UI Components for JSF
Locked
cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Sep 2011, 16:02

So are you trying to override structural css in your custom themes?

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

14 Sep 2011, 16:16

um.. CSS doesn't work like that.

it makes no difference whether it's called as class="structural theme" or class="theme structural" what DOES matter is the order in which the files are loaded. Which currently, is wrong.

and yes i am trying to override structural css in the themes, prime example being, padding on buttons.
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, 16:21

um.. CSS doesn't work like that.
Well, that is how we bring all these themes for you. So I think it works.
and yes i am trying to override structural css in the themes, prime example being, padding on buttons.
Finally! That explains.

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

14 Sep 2011, 16:27

Image

That is a default theme, on your showcase. Which stylesheet is taking priority? hint, it's not theme.css

yes the settings are the same, but they didn't have to be...
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, 16:29

If we render theme after registered css, then we'll break apps that overrides theme visuals by using h:outputStylesheet as a resource registered with h:outputStylesheet will be rendered before theme so people can't override the themes if they are keeping their extensions in a separate css file like myapp.css. This will also break our apps as well since we've used this approach to override themes instead of changing theme.css file.

theme.css file is ideally should contain theme stuff not the structural stuff then. Order is;

- theme.css
- appcssthathasoverrides.css

Which makes sense to me.

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

14 Sep 2011, 16:29

Aristo is an exception, it is a third party theme that doesn't strictly follow general theming patterns/practices.

Default theme of PrimeFaces is sam.

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

14 Sep 2011, 16:31

but my whole point is this. it should be as follows:

-> structural-primefaces.css
-> theme.css
-> appcssthathasoverrides.css

Also, pretty much your entire theme collection is based on theme-roller themes, which are identical in css structure to artisio, so it's not an exception. If anything, Sam is the excpetion.
Last edited by king6887 on 14 Sep 2011, 16:34, 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, 16:33

I believe theme.css should be the first css to render and then rest to allow easy overriding. So we'll take no action and mark created issue as wontfix.

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

14 Sep 2011, 16:35

We can't tell which css overrides or which css is the structural css so;

Code: Select all

-> structural-primefaces.css
-> theme.css
-> appcssthathasoverrides.css
is not valid. A resource is a resource. We can diff a resource css with a theme css though.

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

14 Sep 2011, 16:36

So basically you are restricting a theme to be colours only? and any other css must be applied in a seperate (outside a jar) css file included using <link> not <h:outputstylesheet> because if you use <h:outputstylesheet> it ends up ABOVE the structural css in the same plae as theme.css
Running PrimeFaces 3.0.M2 / 3.0.M4 using Mojarra-2.1.3 on Glassfish 3.1.1

Locked

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests