I am modifying the book.module to emit ordered lists (instead of unordered) for the menus, but this does not work because system.module forces all li.leaf elements to be drawn with a bullet. The following patch fixes it,
--- a/modules/system/system.css
+++ b/modules/system/system.css
@@ -166,19 +166,19 @@ ul.menu {
ul.menu li {
margin: 0 0 0 0.5em;
}
-li.expanded {
+ul li.expanded {
list-style-type: circle;
list-style-image: url(../../misc/menu-expanded.png);
padding: 0.2em 0.5em 0 0;
margin: 0;
}
-li.collapsed {
+ul li.collapsed {
list-style-type: disc;
list-style-image: url(../../misc/menu-collapsed.png);
padding: 0.2em 0.5em 0 0;
margin: 0;
}
-li.leaf {
+ul li.leaf {
list-style-type: square;
list-style-image: url(../../misc/menu-leaf.png);
padding: 0.2em 0.5em 0 0;
though it is suboptimal because one should have used ul>li.leaf (not supported by IE6).
Comments
Comment #1
bonzinip commentedthe patch is present in the description
Comment #2
panchoHey, Paolo,
thanks for your contribution - this change seems to make sense!
However, this is no usable patch (see Creating patches), and without testing, it is certainly not RTBC. Furthermore, bugs get fixed in HEAD (which is now D7) and are backported to D6 afterwards.
Please take this into account and create a new patch, then I will be the first one who tests it...
Best regards, Pancho
Comment #3
bonzinip commentedI didn't create the patch from CVS, but I can confirm that the patch works (I have it on http://smalltalk.gnu.org/step for example). Here is a patch for HEAD instead.
Comment #4
dvessel commentedbonzinip, the patch has to be done from the root install with a checkout from CVS. You also didn't account for the selectors in the RTL style sheet.
cvs diff -up > nameovpatch.patch
But.. I think a better solution to this is to move those menu styles (they are part of the menus system) into system-menu.css so theme devs can override the whole style sheet from their themes instead of worrying about how selectors are formed.
Comment #5
bonzinip commentedThe patch works and is based on the CVS repo, it should not matter how I created it. :-)
The RTL style sheet was not affected, but I might have been wrong. Maybe some settings like the padding actually *do* belong in a more general"li.something" rule; only the list-styles should be changed to "ul.menu li.something".
I don't know enough to understand the last part of your reply. Are you taking the duty?
Comment #6
jody lynnNew patch handles both RTL and LTR
Comment #7
brianV commentedjust bumping for testbot, although this should work...
Comment #8
jody lynnComment #9
jody lynnComment #10
kars-t commentedThis is a nice small patch.
It combines li.expanded, li.collapsed, li.leaf common stiles to one declaration and makes sure only ul gets the disc image set.
Comment #11
webchickCommitted to HEAD, thanks!
Comment #12
sun1) Trailing white-space here.
2) This patch broke menu bullet icons/images in Garland.
Powered by Dreditor.
Comment #13
sunComment #14
kars-t commentedMade a new patch that fixes the trailing space and changed garlands CSS.
imho Garland now should use the specific ul li.leaf path so it has the same weight and can override system.css.
Comment #16
sun#14: 223341-menu-css.patch queued for re-testing.
Comment #17
cosmicdreams commentedWhat would be the best way to test this patch? Can anyone help me setup a proper test of this?
Comment #18
kars-t commented@cosmicdreams
Good question. In Garland you can just look at the navigation menu with firebug if it shows the correct images. But I don't know if this is a really good test for it. And basically "all" themes should be checked if they need to be patched to show their icons. I don't know if there are already simpletests for themes. Even if you couldn't check CSS inheritance than maybe you could at least check for a CSS class that can override the images.
Comment #19
jacineJust tested #14 and it looks good. Thank you :)
Comment #20
realityloop commented#14: 223341-menu-css.patch queued for re-testing.
Comment #21
casey commentedReroll. Stil RTBC.
Comment #22
sunComment #23
dries commentedCommitted to CVS HEAD. Thanks.