Jump to content

Template talk:Navbox: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Responses: reply
Sardanaphalus (talk | contribs)
Responses: +bracket
(One intermediate revision by the same user not shown)
Line 210: Line 210:


::Changing the line spacing isn't hard; it's the padding that's the problem. And there is no mechanism for conditional styling present; a group parameter has no way of knowing what is being passed, nor is it possible to pass conditional CSS from a parent-navbox to it's child, or vice versa. Trying to accomplish this, requires massive conditional coding that places too much stress on the parser; just to correct line-height. The cost is simply too high compared to the supposed benefit. <span style="font-family: verdana;"> — [[User:Edokter|<span style="color: #008;">'''''E''dokter'''</span>]] • [[User_talk:Edokter|<span style="color: #080;">Talk</span>]] • </span> 23:46, 1 October 2008 (UTC)
::Changing the line spacing isn't hard; it's the padding that's the problem. And there is no mechanism for conditional styling present; a group parameter has no way of knowing what is being passed, nor is it possible to pass conditional CSS from a parent-navbox to it's child, or vice versa. Trying to accomplish this, requires massive conditional coding that places too much stress on the parser; just to correct line-height. The cost is simply too high compared to the supposed benefit. <span style="font-family: verdana;"> — [[User:Edokter|<span style="color: #008;">'''''E''dokter'''</span>]] • [[User_talk:Edokter|<span style="color: #080;">Talk</span>]] • </span> 23:46, 1 October 2008 (UTC)

::* I suspected that passing styling between parent and child or vice versa might be the ultimate stumbling block. Although less than ideal, adding one or more group/liststyles to a Navbox template seems a reasonable workaround to me, but there's a user who's been removing them -- not on the grounds that there's a consensus against them, but because they're non-standard, non-default. (This is the main reason behind my revisiting this situation.) If it continues, I guess I'll have to try asking them again to refrain from doing so, but this time with reference to the above. Thanks for confirming my suspicions. [[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 12:51, 2 October 2008 (UTC)


== Parent/child ==
== Parent/child ==

Revision as of 12:56, 2 October 2008

Adding classes

How can an editor add an HTML class to the whole box, or just the title? (like bodyclass or titleclass in {{infobox}})? Andy Mabbett | Talk to Andy Mabbett 17:03, 26 August 2008 (UTC)[reply]

Adding a class to the whole box *could* be achieved via encapsulating it in a <div/> or <table/> tag, though it would probably have some very undesirable side effects. The most elegant way to do so would be to request a change on the (meta)template or to hardcode the box yourself. Adding a class to the title is very simple, just enclose it in a <span/> tag - for example, <span class="yourclasshere">Your title here</span>. Hope that helps! —Dinoguy1000 18:54, 26 August 2008 (UTC)[reply]
Thank you. It's a pity there's no straightforward way to add a class to the whole template, via it's parent <table> element, as there is with, {{infobox}} and templates derived from it - it's necessary to do so, to make the template emit certain microformats. With regard to the title's class, I was hoping for a more elegant method, which would apply the class to the TR or TH element, saving bloat. If anyone can make the former possible, I'd be grateful, please. Andy Mabbett | Talk to Andy Mabbett 19:03, 26 August 2008 (UTC)[reply]
It shouldn't be that difficult to add, maybe CapitalR or someone else would be willing to do so (since I'm not an admin and this is fully protected). —Dinoguy1000 19:22, 26 August 2008 (UTC)[reply]
Sounds useful to me. Just so I'm clear about the request, which elements do you want classes for? Just a bodyclass, aboveclass, imageclass, and belowclass? Or should we also make groupclass and listclass? Or how about groupnclass and listnclass? I'm also concerned about template bloat, so the fewer the better. Let me know which ones are needed and I'll add them. --CapitalR (talk) 16:24, 27 August 2008 (UTC)[reply]
From the point of view of adding microformats, all of them, please. Andy Mabbett | Talk to Andy Mabbett 16:35, 27 August 2008 (UTC)[reply]
The original request would also call for a titleclass. ;) —Dinoguy1000 18:27, 27 August 2008 (UTC)[reply]

← Any news? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 17:45, 8 September 2008 (UTC)[reply]

Problems with spacing on some Navboxes

I'm having problems with the spacing on {{USHouseSpeaker}}. See:

This only happens when the title is linked. Otherwise, everything fits nicely.

There are some more Navboxes like this. See, for example, Category:United States House of Representatives navigational boxes.—Markles 18:17, 4 September 2008 (UTC)[reply]

They both look the same here (FF 3.0.1, Win XP); you need to tell us what browser, version and OS is being used. Have you tried other browsers? Andy Mabbett (aka Pigsonthewing); Talk to Andy Mabbett; Andy Mabbett's contributions 18:46, 4 September 2008 (UTC)[reply]
And what resolution. --Izno (talk) 19:31, 4 September 2008 (UTC)[reply]
Looks good in FireFox3 and Opera. Internet Explorer 8, Safari 3.1.2. for Windows and Chrome all wrap at about 50% of the box width. --—— Gadget850 (Ed) talk - 13:35, 11 September 2008 (UTC)[reply]

It can also be fixed by removing the image:

So, it looks like it happens if you have a linked title and an image. --—— Gadget850 (Ed) talk - 15:26, 11 September 2008 (UTC)[reply]

Browser bug

  • So is there a way to fix this problem? Can the Navbox code be adjusted to compensate for these browser bugs such as this specific one affecting Speakers of the U.S. House?—Markles 12:25, 18 September 2008 (UTC)[reply]

Problems with v·d·e colors

Hello everybody. I'm from catalan wikipedia and we have a little problem when we want to change the title colour. As you can see here and here, the same navbox code gives different results and we don't know why (the navbox code is the same and our CSS code for navboxes is also the same). Thanks!! --Schizodelight (talk) 11:16, 11 September 2008 (UTC)[reply]

I assume {{Tnavbar}} has a difference. Catalan one doesn't support fontstyle parameter. --fryed-peach (talk) 13:18, 11 September 2008 (UTC)[reply]

Another question...

I've created this template:

This template contains a navbox with collapsible groups template (state=child) inside but this additional template doesn't allow me to have uncollapsed the main template if there is only this one in an article and collapsed if there are two or more navbox templates. How can I solve it? What should I write in "state" parameter? Thanks again.!--Schizodelight (talk) 13:38, 12 September 2008 (UTC)[reply]

  • Hi. If I've understood your request correctly, I think adding  |state = expanded  to the parent Navbox should work, i.e.
{{Navbox
|name=Espais naturals de Catalunya
|state = expanded
|title=[[Espais naturals de Catalunya]]
...etc.
Sorry in advance if that's not what you want. Sardanaphalus (talk) 11:06, 18 September 2008 (UTC)[reply]

Request for comment\Style issue

Template:RFCstyle

Hi. Which of the following Navbox template formattings do you prefer, the first (A) or second (B)?

Version A

Version B


Thank you for your input. Sardanaphalus (talk) 10:58, 18 September 2008 (UTC)[reply]

Responses

Comment It might help if you spell out what the differences are and the pros/cons of the changes, so that each responder does not have to research your inquiry. In other words, what are you trying to prove? Rgrds. --Tombstone (talk) 11:40, 18 September 2008 (UTC)[reply]

Comment Before going any further, I will have to state that version B is technically not feasable because it requires coding that breaks other functions like subgroups and nested navboxes. See the discussion at MediaWiki talk:Common.css#Navbox padding and line spacing, where it is explained in more detail. EdokterTalk 19:46, 18 September 2008 (UTC)[reply]

It is -- or should be -- possible; some ingenuity will probably be needed. If it isn't possible, something's amiss with the Navbox setup. Sardanaphalus (talk) 18:16, 19 September 2008 (UTC)[reply]
Don't like to state the obvious, but we're looking at it, so how is it conceivably not feasible?--Kotniski (talk) 07:55, 22 September 2008 (UTC)[reply]
It should also be noted that Sardanaphalus has been angling for this change, or a very similar one, for months now - there should be older discussions on it in the archives somewhere. That being said, I personally prefer option A, though I wouldn't be against slightly tighter linespacing for groups (nothing nearly as cramped as what option B presents, though...). —Dinoguy1000 19:40, 25 September 2008 (UTC)[reply]
In it's current setup, it cannot be done with a simple edit. It would require all navbox style handling to be redone in a major fashion. EdokterTalk 14:18, 22 September 2008 (UTC)[reply]

Technically infeasible - Sardanaphalus has been demanding this change for months now and we have repeatedly answered "no that will break things" and explained that "it will break the navbox subgroups, that is the navbox inside navbox functionality". The reason why his example above seems to work is that it is hard-coded and that it doesn't have any subgroups.

Sardanaphalus is wasting everybody's time with his demands. We have already told you repeatedly: NO we don't know how to solve it, and NO we are not going to spend time trying to solve it for you (we are not your paid employees), and NO we won't accept deploying a broken "solution". (And besides, I think your kind of padding and margins make the link lists harder to read.)

So as we have told you many times before: Sardanaphalus: Your only sane path of action is to code up the whole thing in your own user space and experiment and test it carefully to try to find something that works with your ideas. (But I think it will probably be hard to find such a solution.) Well, you have one other sane path of action, that is no action. Just drop the whole thing and go do something else, okay?

We have no reasons to answer any more questions from you. You have to stop pestering us with your demands and questions. Your refusal to stand down means you are wasting everybody's time and making people angry. And that is detrimental to Wikipedia.

(Anyone curious on the history of this can dig through the archives of this page and check the edit history for Sardanaphalus and see that he have brought up this question again and again on all kinds of talk pages, including putting demands on personal talk pages of those who have been involved in the coding of the navbox system.)

--David Göthberg (talk) 14:44, 30 September 2008 (UTC)[reply]

Well steady on, he only asked people which they prefer. If there's a majority for the unspaced version, that means it may be worth working on implementing that. If not, then not. No-one's obliged to do anything, of course, but presumably changing the line spacing isn't very hard (and if the subgroups are the only things that break, I presume it would be quite easy to make the style declaration conditional on the absence of subgroup parameters).--Kotniski (talk) 08:23, 1 October 2008 (UTC)[reply]
  • Thanks, Kotniski; you've said what I was going to try to say. I asked David whether he thinks it's worthwhile my trying to revamp the Navbox code -- the subtext being a willingness to help, as I'm aware I'm not as expert as he or other people here -- but have seen no response until the above just now. It seems that whatever consensus I try to generate, cultivate or find, it's 'wrong' or 'inappropriate'. As to making demands, I don't believe I have ever made any. Sardanaphalus (talk) 23:21, 1 October 2008 (UTC)[reply]
Changing the line spacing isn't hard; it's the padding that's the problem. And there is no mechanism for conditional styling present; a group parameter has no way of knowing what is being passed, nor is it possible to pass conditional CSS from a parent-navbox to it's child, or vice versa. Trying to accomplish this, requires massive conditional coding that places too much stress on the parser; just to correct line-height. The cost is simply too high compared to the supposed benefit. EdokterTalk 23:46, 1 October 2008 (UTC)[reply]
  • I suspected that passing styling between parent and child or vice versa might be the ultimate stumbling block. Although less than ideal, adding one or more group/liststyles to a Navbox template seems a reasonable workaround to me, but there's a user who's been removing them -- not on the grounds that there's a consensus against them, but because they're non-standard, non-default. (This is the main reason behind my revisiting this situation.) If it continues, I guess I'll have to try asking them again to refrain from doing so, but this time with reference to the above. Thanks for confirming my suspicions. Sardanaphalus (talk) 12:51, 2 October 2008 (UTC)[reply]

Parent/child

I would like to clarify something for myself: if I build nested navboxes, is there a way to have all style parameters inherit from the parent? (groupstyle, titlestyle, etc etc). I'm working on something that is far more elegant when using nested boxes, but I'm not sure how to make styles inherit. is foostyle = inherit the parameter? Thanks! Prince of Canada t | c 06:09, 22 September 2008 (UTC)[reply]

I've often felt it would be nice, but as far as I know there isn't. I think you have to do it manually.--Kotniski (talk) 07:17, 22 September 2008 (UTC)[reply]
That really sucks. Oh well... Prince of Canada t | c 07:18, 22 September 2008 (UTC)[reply]
AFAIK, there is no universal "inherit" feature for CSS... at best, you would have to list a whole bumch of possible CSS properties, setting them all to inherit, but then that starts presenting issues for browser support (I believe IE has some trouble with the inherit attribute for certain properties/elements, but I really don't know much about it). Alternatively, you could just leave the nested elements unstyled and hope they properly inherit their parent's styles (but, again, the whole browser support thing)... —Dinoguy1000 19:43, 25 September 2008 (UTC)[reply]

Rendering (in Firefox?)

Using Firefox, at Recovered Territories I'm seeing the {{Borders of Poland}} Navbox in the middle of the screen, with the table of contents bunched up to the left. In IE I see the Navbox as it should be, at the right of the screen. Is this a known issue? Anything that can be done?--Kotniski (talk) 08:46, 29 September 2008 (UTC)[reply]

It floats right for me in Firefox, Chrome and IE — chandler09:33, 29 September 2008 (UTC)[reply]
Weird, maybe my Firefox didn't load the CSS right or something. Hopefully it will solve itself over time.--Kotniski (talk) 10:05, 29 September 2008 (UTC)[reply]
Very likely a CSS issue — I've had it happen to me before. Usually when someone screws something up on the back end. Silly devs! :D --Izno (talk) 12:58, 29 September 2008 (UTC)[reply]
Well, it seems to have sorted itself out now. (I'm having problems with the positioning of the [edit] buttons, but that's another story.)--Kotniski (talk) 14:21, 29 September 2008 (UTC)[reply]