Template talk:Routemap

(Redirected from Template talk:Routemap/doc)
Latest comment: 2 hours ago by Jonesey95 in topic -collapsible formatting

Changes to BSsplit and BSto display

edit

I have modified the display of {{BSsplit}} and {{BSto}} by using TemplateStyles to ensure that the font size is always the same for the templates when they are used within {{Routemap}}. This is accomplished by adding font-size: 90% to those cases where they are used in the main text cell.

The main result of this is presumably that visual gaps will no longer appear between rows in older diagrams that were constructed before the 2020 font size changes. I believe the templates still comply with the accessibility guidelines, as the smaller font size in both {{BSsplit}} and {{BSto}} is still 85.5% of the regular font size. Please let me know if I broke anything. Jc86035 (talk) 19:58, 26 February 2024 (UTC)Reply

Thanks @Jc86035. Using BSsplit is broken in the mobile view. See Template:Kuala Lumpur–Singapore High Speed Rail for example. Is this something you are able to fix while you're at it? Screenshots: https://ibb.co/b58CHtw (desktop) https://ibb.co/y0CpmT4 (mobile). It feels like there's some CSS cell width inheritance issue in the mobile view, but that's beyond my understanding to try and fix. Thanks. - DCvibes529 talk 04:48, 1 March 2024 (UTC)Reply
@DCvibes529: The reason that this occurs is that there are Minerva CSS rules that only come into effect when the window width is 720 px or less. I think width would have to be used with !important in the TemplateStyles stylesheet to override this.
@media all and (max-width:720px) {
  .content table {
    display:block;
    width:100% !important;
    box-sizing:border-box
  }
  (...)
}
Jc86035 (talk) 09:05, 1 March 2024 (UTC)Reply
@DCvibes529: It should have been fixed, although that diagram in particular still doesn't look great on the mobile site because the uses of {{BSsplit}} are on adjacent rows and have overlapping text. It would help to redesign the diagram so that the text isn't so cramped. Jc86035 (talk) 09:54, 1 March 2024 (UTC)Reply
Thank you, that's awesome! - DCvibes529 talk 17:29, 5 March 2024 (UTC)Reply
@Jc86035 I'm not sure if this is related to the CSS changes that were done (I'm unable to use preview to test since I don't have edit rights on the template). The mobile view is now broken when used inside an infobox: https://ibb.co/NmYXHFC Example article here: https://en.m.wikipedia.org/wiki/Johor_Bahru%E2%80%93Singapore_Rapid_Transit_System Not sure exactly when it broke but it definitely did not have the horizontal gaps in the past. Is this something you're able to take a look and fix? Thanks - DCvibes529 talk 05:33, 18 April 2024 (UTC)Reply
@Jc86035 Another clue from the Yellow Line (BART) page, it appears there are thick borders around the icons now: https://ibb.co/YdkLtrx - DCvibes529 talk 05:41, 18 April 2024 (UTC)Reply
@DCvibes529: This appears to have happened due to changes to the mobile CSS for infoboxes. I'll use !important to make the selectors in the {{Routemap}} CSS override the CSS for infoboxes. Jc86035 (talk) 15:59, 11 May 2024 (UTC)Reply
Looks great now. Thanks! - DCvibes529 talk 14:31, 12 May 2024 (UTC)Reply

Horizontal/rotated text alignment

edit
Test
one
one two three
one two three four five
one two three four five six seven
 
 
 
 
 
 
 
 
one two
one two three four
one two three four five six
one two three four five six seven eight

Hello, how would I go about aligning text cells in icon rows so that they align properly with icons? Longer text tends to go askew (first example), but works for short text (second example).

Test
1
3
5
7
 
 
 
 
 
 
 
 
2
4
6
8

Beeperbeeper5 (talk) 13:11, 7 June 2024 (UTC)Reply

Will using "align" as per Template:Routemap help? - DCvibes529 talk 07:08, 11 June 2024 (UTC)Reply

Template-protected edit request on 28 August 2024

edit

Special:Diff/1242768726/1242768909

Fixes [1]. Andumé (talk) 17:00, 28 August 2024 (UTC)Reply

Symbols

edit

Where can I find which code produces which symbols? Criticalthinker (talk) 04:10, 30 August 2024 (UTC)Reply

@Criticalthinker: As noted in the documentation, for a tabulated list of many of the pictograms available for railway routemaps, see commons:BSicon/Catalogue. --Redrose64 🌹 (talk) 07:49, 30 August 2024 (UTC)Reply
I am thoroughly confused by Template:South Shore Line. What is "BScvt"? I'm also trying to show a grade crossing with the Michigan Line in between Willard Avenue and 11th Street, but can't figure out how to do it for the life of me. Criticalthinker (talk) 11:08, 30 August 2024 (UTC)Reply
"BScvt" is {{BScvt}}. The two braces on either side mean that it is a template. If you edit the template and then fold down "Pages transcluded onto the current version of this page", you will see the templates and modules that are used on the page. As for the grade crossing, asking on the template's talk page as you did will probably work. – Jonesey95 (talk) 13:26, 30 August 2024 (UTC)Reply
"fold down "Pages transcluded onto the current version of this page" Excuse me, what? Edit which template? I do not see this option anywhere. Criticalthinker (talk) 00:02, 31 August 2024 (UTC)Reply
When you are editing Template:South Shore Line, look directly below the "Publish changes" button for "Pages transcluded onto the current version of this page". You should see a little gray triangle to the left of that text. If you click it once, it will reveal a list of the templates and modules that are used on that page. One of them is Template:BScvt. You can click on that template's name to see an explanation of what that template is and how it can be used. – Jonesey95 (talk) 00:18, 31 August 2024 (UTC)Reply

Dark mode problems

edit

@Jonesey95, Jdlrobson, and TheDJ: Thanks for your recent edits to Template:Routemap/styles.css addressing dark mode problems. Unfortunately, there are still some issues, and I'm wondering if the solution of forcing a white background is the right one. To be clear what I'm seeing, I edit in dark mode, and when I look at Greenbush Line, the route map in the infobox has a white background, but some of the text (like "lines via") is unreadable because it is still using the dark mode text color (which is light grey). Looking at Template:Greenbush Line, I see a black background, but some of the text (namely the distances in mi and km) is unreadable because it's being forced to black by the .RMsplit block.

Given the dark mode version with black background is mostly OK, I'm wondering if we can't do the thing most friendly to dark mode users, and start letting railroad diagrams on articles display with a black background? We should be able to fix the text issues. Are there any issues with icons or anything that would cause problems if we go in that direction? I'm not even sure where the CSS is that is forcing the white background, so I can't test changing that. Thanks! -- Beland (talk) 18:50, 9 September 2024 (UTC)Reply

I reached the limit of my technical skill in making a few small changes. I tried a few others, but they didn't work for me. I will defer to others. – Jonesey95 (talk) 00:43, 10 September 2024 (UTC)Reply

-collapsible formatting

edit

Is there a way to have a -collapsible section default to expanded? Useddenim (talk) 14:39, 11 September 2024 (UTC)Reply

It looks like -startCollapsible-nil works. See my sandbox for examples. – Jonesey95 (talk) 17:05, 11 September 2024 (UTC)Reply