Module talk:Sidebar/Archive 6: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Sidebar) (bot
m Archiving 1 discussion(s) from Module talk:Sidebar) (bot
 
(One intermediate revision by the same user not shown)
Line 174:
::::So you could likely move it to CSS, test if the issue is resolved and then undo my change. <span style="background:white; color: black;">🐸</span>&nbsp;[[User:Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) 16:21, 19 October 2024 (UTC)
:::::{{ping|Jdlrobson}} I can't do the change myself - the module and stylesheet are both template-protected. [[User:MKFI|MKFI]] ([[User talk:MKFI|talk]]) 08:33, 20 October 2024 (UTC)
 
== Templatestyles parameter ==
 
{{re|Izno}} Are there [[Wikipedia_talk:TemplateStyles/Archive_1#c-Izno-2018-07-27T01:35:00.000Z-In_the_context_of_meta_templates|still]] benefits of the caller templates using the numerous parameters {{para|templatestyles}}, {{para|child templatestyles}}, and {{para|grandchild templatestyles}} over a simple {{xtag|templatestyles}} in each? [[Special:Contributions/172.97.141.219|172.97.141.219]] ([[User talk:172.97.141.219|talk]]) 10:39, 30 November 2024 (UTC)
 
:Yes. Using the dedicated parameter allows you to use the cascading part of CSS, namely that the CSS in the child will apply after, not before the core TemplateStyles. This avoids the case where the child's styles are potentially overridden by styles of the same specificity in the core styles. You should generally always use these parameters. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 06:03, 1 December 2024 (UTC)
 
== Treating [[Module:Navbar/styles.css]] ==
 
{{ping|Izno}} Is it right not to treat [[Module:Navbar/styles.css]] in add_list_styles() whether sidebar has a navbar or not? If an article page transcludes a sidebar (with a navbar) and another navbar in this order, the styles doesn't seem to be applied on mobile view. [[User:本日晴天|本日晴天]] ([[User talk:本日晴天|talk]]) 15:42, 24 December 2024 (UTC)
 
:add_list_styles is just for the two kinds of lists and is about the classes that have been added since eternity in the several templates (infobox also). Both navbox and sidebar have instead move_hiding_templatestyles which will take care of embedded TemplateStyles tags. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:32, 24 December 2024 (UTC)
::Okay, but on some pages (ex. [https://en.m.wikipedia.org/wiki/Finder_(software)#Timeline Finder_(software)]) on mobile view, navbars are actually displayed in unintended styles because [[Module:Navbar/styles.css]] isn't used. How about modifying this module [[Special:Diff/1129707986/1265334216|like this]] and output an additional templatestyles tag if navbar is used? [[User:本日晴天|本日晴天]] ([[User talk:本日晴天|talk]]) 08:19, 27 December 2024 (UTC)