Template talk:Infobox legislature

From Project Basis
Latest comment: 6 June by Morwen in topic seat layout module
Jump to navigation Jump to search

Template:Talk header Template:WikiProject banner shell Template:Oldtfdfull

Dark mode problem

The number of seats in the image (which shows different parties' seats as colored dots) is always black. This is a problem in dark mode, where the background is very dark grey. mw:Recommendations for night mode compatibility on Wikimedia wikis has some suggested solutions. -- Beland (talk) 18:57, 20 November 2024 (UTC)Reply

For example, see the black "81" in the infobox on Federal Senate (Brazil). -- Beland (talk) 19:00, 20 November 2024 (UTC)Reply

Fix broken background_color in dark mode

The background_color parameter is supposed to set the 2px border above and below section headers, but in dark mode this is overridden by border-color: var(--border-color-subtle, #c8ccd1) !important; under these 2 selectors in the theme CSS:

html.skin-theme-clientpref-night .navbox-title:not(.notheme) (dark mode selected)
html.skin-theme-clientpref-os .navbox-title:not(.notheme) (automatic selected)

I believe this can be fixed by replacing all instances of {{{background_color}}} with {{{background_color}}} !important in the template, but since this is so widely used I wanted to see what more experienced template editors think before changing it. I can't see it causing any issues unless the theme overriding is intentional and has been discussed somewhere I couldn't find.

This can also be fixed on a page-by-page basis by using !important in the background_color param (see here), but since it effects all legislature pages it seems best to fix the template. Jamedeus (talk) 22:24, 5 October 2025 (UTC)Reply

I have noticed that - what I believe to be - an MOS:EASTEREGG is often used in these templates. I have started a discussion elsewhere. I love to hear your thoughts: Wikipedia_talk:Manual_of_Style/Linking#Easteregg:_link_to_specific_cabinet_behind_"Government" Dajasj (talk) 12:18, 21 November 2025 (UTC)Reply

Issue: Can Produce Lots of Whitespace

Hi all, I’ve run into an issue on National Assembly (Hungary) where the infobox seems to be pushing content in a way that leaves a large amount of whitespace and cuts off the table in the following section. I’ve tried adjusting placement and a few formatting variations (Template:clear for example), but the problem persists. Is this a documented behavior with this template? I recall seeing it once way in the past before I was a contributor but don't remember where, so I’m wondering if there’s a standard approach to clean it up. Are there recommended Any guidance would be appreciated—thanks! -eliro Elirockenbeck1 (talk) 15:42, 23 April 2026 (UTC)Reply

Elirockenbeck1: I don't think that's a problem specifically with this template, it's because you have boxes which are forced over to the right and then a template which is forced to the full width of the screen, so it's going to show below. Rcsprinter123 (blab) 10:26, 29 April 2026 (UTC)Reply
Yeah agreed, is best solution just increase amount of text in boxes / add images to left? Elirockenbeck1 (talk) 14:55, 29 April 2026 (UTC)Reply

seat layout module

I've been prototyping a template and module that will make the seat diagrams automatically given data. See User:Morwen/legislature diagram/example for a mockup. The advantage of this of course is that we don't need to use the external tool every time a seat changes hands. Thoughts and collaborators welcome on this, as I'm quite new at the tech side of WP (while being an old hand at coding in general). So far doing semicircle layout only, which would allow it to be used on UK Councils, which were being my main point of friction, but completely open to other arrangements. (Ideally i'd just do a straight port of the external tool, but my read of its licensing situation would be that that doesn't work.) Morwen (talk) 17:25, 3 June 2026 (UTC)Reply

Hi, the original authors of the tool agreed to dual licence it under CC-BY-SA 4.0 so the licensing issue went away; and this has now been deployed as Template:Legislature diagram - currently only used from Islington Council. Morwen (talk) 15:02, 6 June 2026 (UTC)Reply