Modify

Opened 3 years ago

Last modified 2 years ago

#9627 reopened defect

PATCH: fixed menu item height

Reported by: falkb Owned by: rjollos
Priority: normal Component: MenusPlugin
Severity: trivial Keywords:
Cc: Trac Release: 0.12

Description

I saw the mainnav menu item height was not correct with my Trac 0.12.2, and I don't have custom styles installed. It's displayed in FF and IE like this:

This patch fixes that:

Attachments (2)

badHeight.jpg (9.5 KB) - added by falkb 3 years ago.
IE9-Win7x64.png (2.2 KB) - added by rjollos 2 years ago.

Download all attachments as: .zip

Change History (12)

Changed 3 years ago by falkb

comment:1 follow-up: Changed 2 years ago by rjollos

I did some testing with Trac 0.11 and the value 14.75px gives the best results on Ubuntu 10.04 with FF 3.6.24. I doubt that will be true across all browser and OS combinations. Is there a better way to go about this than explicitly setting a value for height in the CSS?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 2 years ago by anonymous

Replying to rjollos:

14.75px

How is a 3/4 pixel possible?

comment:3 in reply to: ↑ 2 Changed 2 years ago by rjollos

Replying to anonymous:

How is a 3/4 pixel possible?

I'm not sure, but if I zoom in many times on the page, then I reach a text size in which I can see the mainnav height change as the height is changed by a fraction of a pixel. I assume the mainnav height is just scaled by the zoom factor, so the fractional value has an effect at a high zoom factor.

Maybe that doesn't matter at all, but my point was, using a fixed pixel value for mainnav height might not be the right solution here. I can't say, I know very very little about CSS and these page layout issues.

comment:4 Changed 2 years ago by falkb

For a while I played around with px, em, percent and that padding-top setting in different zoom levels of FF. I cannot find the one and only size. Sometimes it was too big, sometimes to small.

After all my impression is it all depends on the font of the menu item and its certain size in each zoom level plus a fixed scaled offset. The font height depends on the font which may be different on other styles or OS.

Best would be to take over the size of overlayed menu items, though I don't know how to do so.

comment:5 Changed 2 years ago by rjollos

  • Owner changed from cbalan to rjollos
  • Status changed from new to assigned

Yeah, I see what you mean. Your patch seems like a step in the right direction. Maybe we can get it into the repository after I finish dealing with #7399.

comment:6 Changed 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [11167]) Fixes #9627: Applied patch from falkb to adjust mainnav height to better match the height of the buttons for a default Trac installation. In the future, some proper CSS modifications might provide a better fix for this issue, but we don't know a better solution at the moment.

Changed 2 years ago by rjollos

comment:7 Changed 2 years ago by rjollos

In Trac 0.12.2, the alignment looks correct now in FF9 on Win7-x64, but not in IE9:


comment:8 Changed 2 years ago by falkb

Since we're talking about the height of the bar behind the menu, could a simple artifice help?: Instead of setting a fixed height, insert one single letter that should be overlayed by the foreground menu in all cases. That letter (using the same font like the menu item words) would fit the height as well, automatically.

comment:9 Changed 2 years ago by rjollos

I have no idea if that will work, but it sounds like a clever way to fix this if you can make it work. Maybe you could even just set the color of the letter to be the same as the background so that it is effectively invisible, regardless of a menu overlay.

comment:10 Changed 2 years ago by falkb

  • Resolution fixed deleted
  • Status changed from closed to reopened

although I haven't got a clue when looking at this superfish stuff... hope dies at last

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.