Template talk:SN

From Wikimedia Commons, the free media repository
Jump to: navigation, search

Big Resizing Bug[edit]

Hello everyone,
there is a big bug in this template: Look at Category:Crinum × amabile. Try to resize your navigator width. You will see:

  • "Crinum amabile var. augustum (Ro    xb. ex Ker Gawl.) Ker Gawl.", then
  • "Crinum amabile var. augu    stum (Roxb. ex Ker Gawl.) Ker Gawl."

As if the text was devided in 3 columns (The template doc talks about 3 columns).
This bug can be seen under Chrome and Firefox, but not under InternetExplorer 8.
Cheers Liné1 (talk) 06:41, 11 September 2011 (UTC)

It's a browser issue, but the workaround is to use the col parameter. For long text like this, use |col=1 (one column). I chose 3 columns as the default since it works with the majority of cases: shorter multiple name+author listings. Additionally, "|small=yes" can help. Rocket000 (talk) 08:57, 20 September 2011 (UTC)
If col is not specified, couldn't we modify the algorithm for:
  • If there is only one entry => col should be 1 (like you did (but not automatically) HERE)
  • If there are 2 entries => col should be 2
  • If there are 3 entries => col should be 3
  • If there are 4 entries => col should be 2
  • If there are 5 and more entries => col should be 3
You can see an example in the "2 sandbox" part of {{SN/testcases}}.
Cheers Liné1 (talk) 11:00, 20 September 2011 (UTC)
Sounds like a good idea... so obvious I'm wondering why I didn't do that in the first place. There may have been some reason but I can't remember, so feel free to. :) Rocket000 (talk) 18:01, 22 September 2011 (UTC)
Good work. I forgot to mention that the reason IE8 looked fine was because it doesn't support columns at all! But IE10 will finally support the standard "column-count". Rocket000 (talk) 19:24, 22 September 2011 (UTC)