Last modified: 2008-11-21 18:14:27 UTC
I think the element formating for editbuttons in the wikibits.js is not very usefull for costumizing. It would be better when the format would be defined in CSS and not in the JavaScript directly in the Element. I've changed it this way Index: wikibits.js =================================================================== --- wikibits.js (revision 33871) +++ wikibits.js (working copy) @@ -347,12 +347,9 @@ // we use it to avoid creating the toolbar where javascript is not enabled function mwInsertEditButton(parent, item) { var image = document.createElement("img"); - image.width = 23; - image.height = 22; image.className = "mw-toolbar-editbutton"; if (item.imageId) image.id = item.imageId; image.src = item.imageFile; - image.border = 0; image.alt = item.speedTip; image.title = item.speedTip; image.style.cursor = "pointer";
Hmm, well the problem here is that the actual images *do* have a fixed size. Removing the width and height markers may cause the page to load and lay out more slowly, as the browser must load the images or CSS to lay out the images at the proper size. Under what circumstances would this change have visible benefits?
In my Wiki I have created a alternative Buttonset that can be used through gadget extension. The Icons in the new Buttonset are smaller then the original Buttons, so I had to remove the fixed width to make the Icons beeing shown with the right dimensions.
Assigned: Brion. What's the verdict: FIX or WONTFIX?
Since the image URL is specified with the setup, not with the CSS, it doesn't make sense to me to split the size out to the CSS. JS which changes the URLs (to load different images) can change the sizes as well. Iff the images were specified via CSS, then specifying the size there as well would make sense.