3.0-SNAPSHOT Regression: menubar submenu border

UI Components for JSF
Post Reply
User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

22 Feb 2011, 20:45

I've noticed in the latest 3.0-SNAPSHOT that the menubar's submenu borders have been removed. This causes a seemingly invisible submenu when the content of the page that the submenu opens into has the exact same background color. This problem can actually be observed in the labs showcase using the default theme (aristo) with IE 8:

http://www.primefaces.org/showcase-labs/ui/menubar.jsf

Note: this problem is more evident with IE because shadows aren't used. However, even with Firefox not all themes use shadows (try black-tie with FireFox for example).

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

22 Feb 2011, 22:27

Looks like this falls under this ticket:

http://code.google.com/p/primefaces/iss ... il?id=1767

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

22 Feb 2011, 23:29

Hi,

I could fix that for "sam" theme (in order to match the old "sam") as follows

Code: Select all

.wijmo-wijmenu {
    padding: 0.1em 0.3em 0.1em 0.3em;
}

.wijmo-wijmenu-horizontal,
.wijmo-wijmenu-list {
    background: none;
    background-color: #F5F5F5;  // sprite.png is better
}

.wijmo-wijmenu-link {
    white-space: nowrap !important;
}

.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child {
    width: 220px;   // sadly, but width can not be "auto"
}

.wijmo-wijmenu-horizontal .ui-state-active {
    color: white !important;
}

.wijmo-wijmenu-horizontal div div div ul li ul {
    border: 1px solid #a8a8a8;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
}
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

23 Feb 2011, 14:31

Hmm... I'm not too concerned about using the sam theme. My concern is that borders have been removed from submenus thus wrecking havoc on the layouts of applications which use the menubar.

bluewing
Posts: 25
Joined: 14 Aug 2010, 19:02

28 Feb 2011, 00:12

This is present in 2.2.1 as well, try http://www.primefaces.org/showcase/ui/menubar.jsf with humanity theme, hover state is barely visible.
GlassFish 3.1, Mojarra 2.1.0-FCS, Facelets, PrimeFaces 2.2.1

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

28 Feb 2011, 12:22

We'll take a look at submenu border issue as of 3.0, there are filed tickets already. Right now workaround is to use the provided css solution.

For theme specific visual issues like humanity hover style, you can solve it with css in your app, no need to wait for PrimeFaces to update a specific theme release.

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

28 Feb 2011, 15:42

Where is the css solution discussed?

I've seen a few threads about changing the background color, but none about adding the borders back.

The problem I have is that my app allows the user to change the theme on the fly (theme switcher). I can come up with CSS to set the submenu border to a specific color, but I haven't come up with a straight-forward way to make it dynamic based on selected theme. This is because the the theme's use the ui-widget-content class to add the borders (which are theme specific), but the ui-helper-reset class is overridding the border and setting it none.

User avatar
neijunior
Posts: 74
Joined: 15 Jul 2010, 04:46
Location: São Paulo - Brasil

28 Feb 2011, 17:24

I also noticed this problem when I updated to PrimeFaces 2.2.1.
Mojarra 2.2.x, Facelets, Glassfish V4.1, Primefaces 5.1, Eclipse Mars 1, JPA 2, EJB 3

Nei Alcantara Jr.
http://twitter.com/NeiAlcantaraJr

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

01 Mar 2011, 23:07

One way to put the borders back in is to give the ui-widget-content class a higher specificity than the ui-helper-reset class. Unfortunately the only way I've been able to do that is to modify the theme.css file for a particular theme. I changed:

Code: Select all

.ui-widget-content { border: 1px solid #8e846b; ...
to:

Code: Select all

.ui-widget-content, .wijmo-wijmenu .ui-widget-content { border: 1px solid #8e846b; ...
I've got a custom theme switcher with a dozen themes so this is pretty painful in and of itself and then there is the issue that now I've got more patch code to maintain!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests