![]() | Templates | |||
|
This page has archives. Sections older than 60 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
I have started a discussion about using a general templatestyles page directly in articles to align a whole column without code in each cell: Wikipedia:Village pump (technical)#Column alignment. PrimeHunter ( talk) 14:59, 13 December 2022 (UTC)
This question relates to a RfC at Wikipedia talk:Manual of Style/Tables#Template:Sort under and a discussion at the {{ Sort under}} template talk page. One user expressed an interest in having two classes with identical styling for reasons he feels makes the template easier to use. Example:
It's my understanding that only essential styles are added to MediaWiki:Common.css to help keep size and load times minimal, amongst other reasons. Do template styles follow the same practice? Are there any unforeseen problems? Keep in mind that duplicating the styles would add an extra 16 CSS selectors (thus far) to Template:Sort under/styles.css. Jroberson108 ( talk) 09:31, 5 February 2024 (UTC)
{{static row numbers}}{{sticky header}}{{sort under}}
{| class="wikitable sortable static-row-numbers sticky-header sort-under"
@
Redrose64,
TheDJ, and
Pppery: or anyone else. I'm not seeing much documentation on template scripts, so I'm asking here. Can a script be added to the {{
sticky header}} template for .sticky-header:not(.sortable)
to move header rows into the <thead>
element? I understand the need to avoid malicious code, but if it were managed similar to gadgets by someone with higher permissions, then I would think it's possible. Ideally, MediaWiki would just do this to all tables (not just sortable) making this script and the same move done in the sticky gadget obsolete.
Jroberson108 (
talk)
21:21, 16 February 2024 (UTC)
Should TemplateStyles be officially preferred (where possible) to sitewide CSS for non-sitewide styling? 15:30, 21 February 2024 (UTC)
the first time a bot is "implementing" TemplateStyles this way places this BRFA as a precedent and puts an even larger onus on BAG to establish a clear consensus for the task. I think this discussion would clearly resolve that concern. House Blaster ( talk · he/him) 17:42, 21 February 2024 (UTC)
officially preferredmean that - where possible - style rules in sitewide CSS should be moved to the TemplateStyles of the relevant templates? Only asking as it occurred to me that it could potentially also refer to changing the content model of all sitewide CSS files to TemplateStyles/moving all sitewide CSS rules to a fully-protected TemplateStyles page. (It might just be me who's confusing themselves with the wording, though!) All the best, — a smart kitten[ meow 17:18, 21 February 2024 (UTC)
for non-sitewide styling). House Blaster ( talk · he/him) 17:27, 21 February 2024 (UTC)
Styles included by a template can currently affect content on the page outside of the content generated by that template, but this ability may be removed in the future and should not be relied upon.We should not make use of such functionality so as to not end up in a position where another migration would be needed if said functionality is removed, which would prohibit uses like the one proposed in Wikipedia:Bots/Requests for approval/William Avery Bot 5. — JJMC89 ( T· C) 04:36, 22 February 2024 (UTC)
![]() | Templates | |||
|
This page has archives. Sections older than 60 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
I have started a discussion about using a general templatestyles page directly in articles to align a whole column without code in each cell: Wikipedia:Village pump (technical)#Column alignment. PrimeHunter ( talk) 14:59, 13 December 2022 (UTC)
This question relates to a RfC at Wikipedia talk:Manual of Style/Tables#Template:Sort under and a discussion at the {{ Sort under}} template talk page. One user expressed an interest in having two classes with identical styling for reasons he feels makes the template easier to use. Example:
It's my understanding that only essential styles are added to MediaWiki:Common.css to help keep size and load times minimal, amongst other reasons. Do template styles follow the same practice? Are there any unforeseen problems? Keep in mind that duplicating the styles would add an extra 16 CSS selectors (thus far) to Template:Sort under/styles.css. Jroberson108 ( talk) 09:31, 5 February 2024 (UTC)
{{static row numbers}}{{sticky header}}{{sort under}}
{| class="wikitable sortable static-row-numbers sticky-header sort-under"
@
Redrose64,
TheDJ, and
Pppery: or anyone else. I'm not seeing much documentation on template scripts, so I'm asking here. Can a script be added to the {{
sticky header}} template for .sticky-header:not(.sortable)
to move header rows into the <thead>
element? I understand the need to avoid malicious code, but if it were managed similar to gadgets by someone with higher permissions, then I would think it's possible. Ideally, MediaWiki would just do this to all tables (not just sortable) making this script and the same move done in the sticky gadget obsolete.
Jroberson108 (
talk)
21:21, 16 February 2024 (UTC)
Should TemplateStyles be officially preferred (where possible) to sitewide CSS for non-sitewide styling? 15:30, 21 February 2024 (UTC)
the first time a bot is "implementing" TemplateStyles this way places this BRFA as a precedent and puts an even larger onus on BAG to establish a clear consensus for the task. I think this discussion would clearly resolve that concern. House Blaster ( talk · he/him) 17:42, 21 February 2024 (UTC)
officially preferredmean that - where possible - style rules in sitewide CSS should be moved to the TemplateStyles of the relevant templates? Only asking as it occurred to me that it could potentially also refer to changing the content model of all sitewide CSS files to TemplateStyles/moving all sitewide CSS rules to a fully-protected TemplateStyles page. (It might just be me who's confusing themselves with the wording, though!) All the best, — a smart kitten[ meow 17:18, 21 February 2024 (UTC)
for non-sitewide styling). House Blaster ( talk · he/him) 17:27, 21 February 2024 (UTC)
Styles included by a template can currently affect content on the page outside of the content generated by that template, but this ability may be removed in the future and should not be relied upon.We should not make use of such functionality so as to not end up in a position where another migration would be needed if said functionality is removed, which would prohibit uses like the one proposed in Wikipedia:Bots/Requests for approval/William Avery Bot 5. — JJMC89 ( T· C) 04:36, 22 February 2024 (UTC)