Template talk:Static row numbers/Archive 2
Latest comment: 7 months ago by Jroberson108 in topic Header cell outline
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 |
bnwiki
Hi, on bnwiki we use Bengali numerals. However this template doesn't produce Bengali numeral on bnwiki (example). Is there a way to fix this? আফতাবুজ্জামান (talk) 00:32, 10 December 2023 (UTC)
- @আফতাবুজ্জামান: The place to do this seems to be line 17 of Template:Static_row_numbers/styles.css, where you need to change the counter style. Instead of
content: counter(rowNumber);
- try
content: counter(rowNumber, bengali);
- However, this doesn't work here on English Wikipedia. I assume this is because the counter style is not set, as it works for changing to Roman numerals with
content: counter(rowNumber, upper-roman);
- So try it on the Bengali Wikipedia where the CSS might be set up differently.
- As far as I can work out the following code should set up the Bengali numbering:
@counter-style bengali { system: numeric; symbols: "\9E6" "\9E7" "\9E8" "\9E9" "\9EA" "\9EB" "\9EC" "\9ED" "\9EE" "\9EF"; /* ০ ১ ২ ৩ ৪ ৫ ৬ ৭ ৮ ৯ */ }
- However Wikipedia only allows a limited subset of CSS in templatestyles and doesn't allow changing rules like that. If it's not set up already on Bengali Wikipedia, then you will have ask technical support there. — Jts1882 | talk 08:53, 10 December 2023 (UTC)
- @Jts1882, You are right, both options doesn't work. I don't know where to set it up. Something like MediaWiki:Cite link label group-decimal? আফতাবুজ্জামান (talk) 22:46, 10 December 2023 (UTC)
- I can't really help further as I can't navigate the Bengali Wikipedia. I can't even find the Template:Static_row_numbers/styles.css file.
- For technical questions on the English wikipedia I would ask at Wikipedia:Village_pump_(technical). Is there a similar place on the Bengali wikipedia where you could ask for help on the setup of counter style? — Jts1882 | talk
- @Jts1882, We don't have anyone who can fix it, that's why i am asking here. Bengali Template:Static_row_numbers/styles.css file is here. Feel free to try (use bn:বাংলাদেশের বিশ্ববিদ্যালয়ের তালিকা to preview). One thing I don't understand is how
content: counter(rowNumber, lower-greek);
works in templatestyles even on bnwiki? Where is it set up in enwiki? --আফতাবুজ্জামান (talk) 19:57, 11 December 2023 (UTC)
- @Jts1882, We don't have anyone who can fix it, that's why i am asking here. Bengali Template:Static_row_numbers/styles.css file is here. Feel free to try (use bn:বাংলাদেশের বিশ্ববিদ্যালয়ের তালিকা to preview). One thing I don't understand is how
- @Jts1882, You are right, both options doesn't work. I don't know where to set it up. Something like MediaWiki:Cite link label group-decimal? আফতাবুজ্জামান (talk) 22:46, 10 December 2023 (UTC)
- If I view the following list here at the English Wikipedia with
ol { list-style-type: bengali; }
added to the CSS with my browser (adding it to your CSS or MediaWiki:Common.css should work the same) then I get Bengali numbering:
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
- Item 6
- Item 7
- Item 8
- Item 9
- Item 10
- My CSS knowledge is very limited and I don't know how to apply it to row numbers. PrimeHunter (talk) 23:26, 11 December 2023 (UTC)
- @PrimeHunter: I was also able to get the bengali numbering working with lists by adding
ol { list-style: bengali; }
to my common.css. Butcontent: counter(rowNumber, bengali);
doesn't work in the styles.css of this template. If I setcontent: counter(rowNumber, lower-roman);
, I get the roman numbering in the edit preview (e.g. the table at Bauxite). If I then use the browser Inspect and change lower-roman to bengali then I see the bengali numbering. I assume it's something to do with the Wikimedia setup not allowingbengali
as an option in the counter, possibly related to the santitised CSS rules. None of the language options for list-style-type are allowed, only decimal, upper/lower roman, upper/lower-alpa and a few others. Perhaps this is something a system administrator can change. — Jts1882 | talk 08:56, 12 December 2023 (UTC)- I added this to my bn:Special:MyPage/common.css):
- @PrimeHunter: I was also able to get the bengali numbering working with lists by adding
table.static-row-numbers.sortable tbody tr:not(.static-row-header):not(.static-row-numbers-norank)::before,
table.static-row-numbers.mw-sticky-header tbody tr:not(.static-row-header):not(.static-row-numbers-norank)::before,
table.static-row-numbers:not(.sortable) tbody tr:not(:first-child):not(.static-row-header):not(.static-row-numbers-norank)::before {
content: counter(rowNumber, bengali);
}
- and previewed bn:টেমপ্লেট:স্থিত সারির সংখ্যা/শৈলী.css without the line
content: counter(rowNumber);
. That seemed to work for me but it's hard to follow Bengali numbers. If it works for you then move the code from bn:Special:MyPage/common.css to bn:MediaWiki:Common.css. PrimeHunter (talk) 11:01, 12 December 2023 (UTC)
- and previewed bn:টেমপ্লেট:স্থিত সারির সংখ্যা/শৈলী.css without the line
- @আফতাবুজ্জামান: Did you get an opportunity to try this? — Jts1882 | talk 16:18, 13 December 2023 (UTC)
- @Jts1882:We have the same issue on fawiki. I tried all of the solutions to no avail! Yoosef (talk) 21:58, 12 January 2024 (UTC)
- @Yoosef Pooranvary: Unfortunately, I have nothing to add. My understanding is that you can test the solution suggested by PrimeHunter in your own space (js/css), but the site wide solution would need Admin help. — Jts1882 | talk
- @Yoosef Pooranvary: I don't know Persian numbers but it seems to work for me. Add this (matching current code in fa:Template:Static row numbers/styles.css) to fa:Special:MyPage/common.css:
- @Jts1882:We have the same issue on fawiki. I tried all of the solutions to no avail! Yoosef (talk) 21:58, 12 January 2024 (UTC)
- @আফতাবুজ্জামান: Did you get an opportunity to try this? — Jts1882 | talk 16:18, 13 December 2023 (UTC)
body:not(.skin-minerva) .static-row-numbers.sortable tbody tr:not(.static-row-header):not(.static-row-numbers-norank)::before,
body.skin-minerva .static-row-numbers tbody tr:not(:first-child):not(.static-row-header):not(.static-row-numbers-norank)::before,
table.static-row-numbers:not(.sortable) tbody tr:not(:first-child):not(.static-row-header):not(.static-row-numbers-norank)::before {
content: counter(rowNumber, persian);
}
- Remove the line
content: counter(rowNumber);
in fa:Template:Static row numbers/styles.css. If it works then ask an interface administrator (list) to add the same code to fa:MediaWiki:Common.css. PrimeHunter (talk) 22:17, 13 January 2024 (UTC)- Thank you very much. It worked for me. I asked an admin to take care of it. Yoosef (talk) 20:30, 14 January 2024 (UTC)
- @আফতাবুজ্জামান: My suggestion worked at fawiki where it's now live in fa:MediaWiki:Common.css, and the table at fa:Template:Static row numbers is showing Persian numerals with no need for personal CSS. Use my code from 12 December 2023 for bnwiki and remember to remove
content: counter(rowNumber);
from bn:টেমপ্লেট:স্থিত সারির সংখ্যা/শৈলী.css. PrimeHunter (talk) 18:27, 15 January 2024 (UTC)
- @আফতাবুজ্জামান: My suggestion worked at fawiki where it's now live in fa:MediaWiki:Common.css, and the table at fa:Template:Static row numbers is showing Persian numerals with no need for personal CSS. Use my code from 12 December 2023 for bnwiki and remember to remove
- Thank you very much. It worked for me. I asked an admin to take care of it. Yoosef (talk) 20:30, 14 January 2024 (UTC)
- Remove the line
Header cell outline
As of the last one or two edits to the css all of the row headers have a different color than the rest of the table. Looks black in light mode and white in dark mode. Should be the same grey as everything else. Wizmut (talk) 06:41, 20 January 2024 (UTC)
- @Wizmut: Can you give more info so I can reproduce it? What type of table: sortable, wikitable, plain with border attribute? Where are you viewing it: mobile app, Chrome, Firefox, desktop, Android/iPhone? Are you using the default skin? Do you have a link to the table? Jroberson108 (talk) 10:38, 20 January 2024 (UTC)
- Any table with classes "wikitable static-row-numbers", including sortable or not. The tables on this page all do it, but also List of U.S. states and territories by area. Simplest example on my sandbox[1]
- Default skin with Firefox. Noticed it with the Dark Reader extension on but still happens (in reverse) with it disabled. Happens in both desktop and mobile view, on laptop.
- Checked in Edge, weird colors do not occur (though border is thicker than other cells). Wizmut (talk) 11:05, 20 January 2024 (UTC)
- @Wizmut: OK, so Windows desktop browsers. I take it you are referring to one of the gadgets: "Dark mode toggle" and "Core styling for dark mode gadget"? Jroberson108 (talk) 11:32, 20 January 2024 (UTC)
- Ah, browser's Dark Reader extension, not gadget. I'll test it. Jroberson108 (talk) 11:37, 20 January 2024 (UTC)
- @Wizmut: I see the issue on wikitables in Firefox even without the extension. I don't see issues in Chrome or Edge. Apparently, Firefox doesn't inherited colors in this way, so I'll work on a fix. Jroberson108 (talk) 12:22, 20 January 2024 (UTC)
- @Wizmut: I reverted the last CSS change for now, which fixed Firefox. Still working on it in sandbox. Jroberson108 (talk) 18:30, 20 January 2024 (UTC)
- Appreciate the effort! Regards, Wizmut (talk) 18:43, 20 January 2024 (UTC)
- @Wizmut: Done with the changes and live now after extensive testing. Borders have been fixed across the different skins. Checked the different Windows browsers (Chrome/Edge/Firefox), sticky gadget (default skin), Dark Reader browser extension (default skin), Android mobile browsers (Chrome/Firefox), and Android Wikipedia app. I do see an issue (borders doubling) when used in conjunction with the {{sticky header}} template, which is related to how that template attempts to fix borders by changing "border-collapse" from "collapse" to "separate", something that should be fixed on the other template. Note that using the sticky gadget instead of that template doesn't have the same border issues. Per these discussion edits, the sticky template was removed from the discussed help page because it broke horizontal scrolling of wide table on mobile browsers in portrait orientation. Jroberson108 (talk) 04:21, 21 January 2024 (UTC)
- It looks amazing, great work! Appreciate all the different tests. Wizmut (talk) 04:32, 21 January 2024 (UTC)
- I went ahead and fixed the issue on the {{sticky header}} template's styles. List of U.S. states and territories by area no longer shows double borders on Firefox. Jroberson108 (talk) 04:34, 21 January 2024 (UTC)
- It looks amazing, great work! Appreciate all the different tests. Wizmut (talk) 04:32, 21 January 2024 (UTC)
- @Wizmut: Done with the changes and live now after extensive testing. Borders have been fixed across the different skins. Checked the different Windows browsers (Chrome/Edge/Firefox), sticky gadget (default skin), Dark Reader browser extension (default skin), Android mobile browsers (Chrome/Firefox), and Android Wikipedia app. I do see an issue (borders doubling) when used in conjunction with the {{sticky header}} template, which is related to how that template attempts to fix borders by changing "border-collapse" from "collapse" to "separate", something that should be fixed on the other template. Note that using the sticky gadget instead of that template doesn't have the same border issues. Per these discussion edits, the sticky template was removed from the discussed help page because it broke horizontal scrolling of wide table on mobile browsers in portrait orientation. Jroberson108 (talk) 04:21, 21 January 2024 (UTC)
- Appreciate the effort! Regards, Wizmut (talk) 18:43, 20 January 2024 (UTC)