This is the
talk page for discussing improvements to the
Collapse template. |
|
Archives: 1 |
So is it just me, or is this template completely broken? It certainly looks nothing like the results of {{ Collapse top}} and {{ Collapse bottom}}. It just presents the content it is supposed to put a collapse box around, and puts an empty little box, with no controls, below that content. This is using Google Chrome, current non-dev version as of this writing, on Vista x64 SP 2. — SMcCandlish Talk⇒ ʕ(Õلō)ˀ Contribs. 11:28, 12 January 2010 (UTC)
Hi. Is it just me, or doesn't this template work with tables? Rehman( +) 01:01, 9 September 2010 (UTC)
Can we restrict this so it cannot be used in articles? It is structured in such a way that it will not show in the print version (navbox class). For example, try the "printable version" of pages like this page. For this reason, I think it should only be used on user pages and talk pages, but restricting to non-articlespace would be a good start. Frietjes ( talk) 22:28, 8 April 2011 (UTC)
Extended content
|
---|
None of the examples on
Template:Collapse/doc appear collapsed. When I preview edits the template appears collapsed, but when I save the edit it appears "uncollapsed".
|
Hyacinth ( talk) 01:19, 25 September 2012 (UTC)
Compare:
Code:
{{collapse|width=auto|title=Centered for no apparent reason|1={{lorem}}}}
Result:
Centered for no apparent reason
|
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
Even this code results in unwanted centering:
<div style="text-align: left;">{{collapse|left=y|width=auto|title=Still centered despite all efforts!|1={{lorem}}}}</div>
Result:
Still centered despite all efforts!
|
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
But this works "magically":
{| |- | {{collapse|width=auto|title=Left-aligned, as expected|1={{lorem}}}} |}
Result:
|
The only non-table version that seems to work is this:
<div style="float: left;">{{collapse|width=auto|title=Left-aligned with <code>float:left</code>|1={{lorem}}}}</div>
Result:
Left-aligned with
float:left |
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
But it requires {{
clear|left}}
(or HTML+CSS equivalent) after it, and seems like a blecherous, truly brute-force approach, not much better than the table. Maybe I just need more coffee or something. —
SMcCandlish ☺
☏
¢ ≽ʌⱷ҅ᴥⱷʌ≼
15:40, 7 August 2015 (UTC)
margin: 0.2em auto auto;
in the outer container.
Frietjes (
talk)
13:19, 8 August 2015 (UTC)
|width=auto
parameter (which means that the block may be less than 100% wide) with
this edit by
Ahecht (
talk ·
contribs) - if a block is less than 100% wide, and is not aligned to a margin, the css declaration margin: 0.2em auto auto;
(top margin 0.2em, other three margins automatic) causes horizontal centring of that block.text-align:
property affects text inside blocks (<div>...</div>
is a block-type element), it doesn't affect the alignment of the block as a whole, see
CSS 2.1 section 16.2; (ii) the |left=y
parameter applies the declaration text-align: left;
to a table cell (for our purposes, cells are also block-type elements), so it again affects text inside that cell, not the alignment of a cell.float:
property affects the alignment of a block.|width=auto;margin-left:0;
Left-aligned with
margin-left:0; |
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
width:
propeerty is set after the margin:
property, so is not guaranteed to be future-proof. --
Redrose64 (
talk)
13:52, 8 August 2015 (UTC)
|float=
... option to this template, and we should rewrite this one as a wrapper for {{
collapse top}}/{{
collapse bottom}} to reduce code duplication.
Frietjes (
talk)
13:57, 8 August 2015 (UTC)
|float=
, with no changes to the default behaviour.
Frietjes (
talk)
12:58, 23 July 2016 (UTC)This interaction was a bit old and might be hard to understand for people like me who don't have experience with CSS. This was kinda done above, but imo not clearly so here's what I ended up doing to have multiple collapsibles all left-aligned.
{{collapse | title = This is the title | width = auto | float = left |
This is a text body.
}} {{clear | left}}
Which renders as:
This is the title
|
---|
This is a text body. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
It's important to add the {{clear | left}}
at the end if you have multiple collapsibles on your page. Otherwise all of the boxes will use the first one's left margin.
— tr3ndybear 20:44 (UTC), 11 March 2020
I wanted to use this on w:ht:Wikipedya:Akèy nouvo arivan yo, to provide an English translation in a collapsed form. So I copied this, and then {{ main other}}, which it requires, but it still doesn't collapse the content. Am I missing something else? WhatamIdoing ( talk) 23:29, 6 February 2016 (UTC)
collapsible
uncollapsed
and collapsed
in the appropriate CSS files? Is the JavaScript that does the actual collapsing installed? --
Redrose64 (
talk)
08:28, 7 February 2016 (UTC)
border-collapse: collapse;
has nothing to do with it. This affects borders in tables:
|
|
With the example {{sidebar with collapsible lists}} what is the parameter to prevent a sidebar from being collapsible at all? Say with the {{Signpost-subscription}} template, how would I make it to where it doesn't collapse or where there is no option to collapse it? Book-Portal & Talk 11:11, 17 March 2016 (UTC)
|collapse=no
or really anything other than |collapse=yes
. if you have another example, I can try to help.
Frietjes (
talk)
16:34, 17 March 2016 (UTC)|content#=
fields instead of the |list#=
fields. however, if you are not going to have [show]/[hide] buttons, you should used {{
sidebar}} instead of {{
sidebar with collapsible lists}}. for example, the version I created for you and added
in this edit.
Frietjes (
talk)
17:05, 17 March 2016 (UTC)The most frequent use of this template (or the {{
Collapse top}}...{{
Collapse bottom}} pair) is to collapse off-topic blather, details only a few people will want to look at, and other "trivia", but the bright color attracts attention to it, when this is the opposite of the intended effect. I propose changing the default color of both templates to #D3D3D3
(a.k.a. LightGray
or LightGrey
:
Example!
|
---|
It really is just an example.
|
I find myself using this about 95% of the time, and it gets tiresome to keep adding the bg parameter.
PS: I agree with above suggestion to merge these templates (and their documentation), and just use one as the wrapper for the other so we don't have forked code. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 12:13, 12 April 2016 (UTC)
Note – The proposed background color is not AAA-compliant with the default link color (#0669AD). The current one might be OK as it's bold and larger than 14pt (~14px = ~18.5px). nyuszika7h ( talk) 14:28, 24 April 2016 (UTC)
Example!
|
---|
It really is just an example.
|
|bg=F0F2F5
. --
Izno (
talk)
14:51, 12 June 2016 (UTC)
|bg=#CCFFCC
or arbitrary color of interest. --
Izno (
talk)
15:08, 12 June 2016 (UTC)|bg=
parameter says, "Defaults to #CFC - a pleasant green." Is that not the old default value? I'm clueless as to your job queue reference. ―
Mandruss
☎
22:32, 12 June 2016 (UTC)
I'm fine being reverted @ Godsy, but I disagree about your read of consensus existing at this talk page (prior to the change). Of the people here who responded to the original discussion, only a single person (QEDK) objected to any change, with 4 others agreeing to a change, and a few of those agreeing to the exact change made (and I think the more logical change was in fact to the grey pointed out by Frietjes, for accessibility reasons, relative to the original grey proposed).
@ Mandruss: I indeed anticipated them but only due to the wide-reach of the template and for no other reason. Softlavender asked how to take care of it for his own personal use after the change, so a solution for him is present. SMC pointed out in re to QEDK that a separate template wouldn't fly at TFD, so that solution is out. Now I'm left with Godsy's "I don't like it/I like something else" and your own "see about getting a wider consensus"; both objections I feel to be of low value relative to the change (and its reasoning) proposed (that the template, unnecessarily, calls attention to information which we deliberately want to have collapsed).
@ Frietjes, Nyuszika7h, SMcCandlish, QEDK, and Bishonen, FYI. -- Izno ( talk) 11:19, 13 June 2016 (UTC)
WP:BURO is relevant to "that kind of reasoning". We don't need everyone's agreement prior to full-steaming ahead. Sometimes it's a good idea. Here? Questionably, since I agree with your comment regarding "it's a peanuts issue size-wise".
Regarding pinging, they're the ones who will want to take action to search for wider consensus, since I am going to have no dog in this fight, deliberately-so. The people involved are all familiar with what occurs after a reversion is made; I obviously and personally won't revert the reversion, per the WP:Template editor and WP:WHEEL warring guidelines. -- Izno ( talk) 12:05, 13 June 2016 (UTC)
|bg=#F0F2F5
in those collapses. ―
Mandruss
☎
16:01, 13 June 2016 (UTC){{
Cot|bg=lightgrey}}
. --
QEDK (
T ☕
C)
14:23, 14 June 2016 (UTC)Please see Template talk:Collapse top#RfC: Heading centered or left-aligned by default? for a multi-template discussion that includes this template. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 10:30, 20 April 2016 (UTC)
FYI, this template does not appear to work on mobile using Android and chrome. Not sure if that's helpful or not. TimothyJosephWood 22:27, 29 November 2016 (UTC) TimothyJosephWood 22:27, 29 November 2016 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I
changed the sandbox to use mw-collapsible
instead of collapsible
. The former is provided by MediaWiki core, so it makes the template easier to copy between wikis, and using it is a small step to the eventual removing of collapsible
from Common.js. –
Tacsipacsi (
talk)
15:29, 17 December 2017 (UTC)
![]() | This help request has been answered. If you need more help, you can , contact the responding user(s) directly on their user talk page, or consider visiting the Teahouse. |
I want to copy the vastly simplified version of this template at User:Launchballer/sandbox to http://wiki.apterous.org, but it isn't collapsing when I copy it over. The documentation suggests the template depends upon having rules for the three classes (collapsible, uncollapsed, and collapsed) in the appropriate CSS files, and some related JavaScript installed - where would I check?-- Laun chba ller 03:40, 2 June 2020 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please remove the font size changes and the unneeded span tag. Now the table cell for the title is set with font size 88%, and the title is then again set with a span tag with font size 115%. This calculates to 100,05%. If we instead just use the default 100% we get the same font size and also fixes a few Special:LintErrors. See this edit in sandbox for the change. Tholme ( talk) 15:03, 9 June 2020 (UTC)
<span>
with
TemplateStyles: /* The collapsible toggle when it actually works */
.collapse-template-header > .mw-collapsible-toggle,
/* The collapsible toggle during page load, when it’s still just a placeholder */
.collapse-template-header::before {
font-size: 87%;
}
class="collapsible-template-header"
to the header cell). This way the simple syntax is kept, but the small toggle returns. The only issue with this approach is that this template is designed to be substituteable, and having raw <templatestyles> tags in non-template namespace is not a nice thing. I don’t know how much it’s actually substituted, though. —
Tacsipacsi (
talk)
13:13, 11 June 2020 (UTC)
However, the larger problem is that if these are stacked next to each other for whatever reason, then there will need to be CSS that accounts for the fact that it is nowIn templates intended to be substituted, or those likely to be substituted, use {{ ifsubst}} to remove the TemplateStyles tag. Example: {{ allcaps}}. Inline styles may be used as the "if substed" case in a substituted template. Example: {{ smallcaps}}.
.mw-collapsible + link + .mw-collapsible
, rather than .mw-collapsible + .mw-collapsible
.--
Izno (
talk)
13:26, 11 June 2020 (UTC)
::before
cannot be targeted with inline CSS, while the .mw-collapsible-toggle
could in theory, but isn’t present in the wikitext. Stacking is less of an issue, as putting the TemplateStyles tag within the header cell works it around (that’s not a particularly elegant solution, but at least it works). —
Tacsipacsi (
talk)
19:52, 11 June 2020 (UTC)
curently: In these templates, one has to click the [show]/[hide] text to expand/collapse the content. This isn't ideal on wide screens where the title and the toggle can be far apart.
proposed: On some other wikis, it is possible to simply click anywhere on the template (
example), and so it responds better to different pagewidths.
Thoughts and opinions?
T.Shafee(Evo&Evo)
talk
09:08, 13 June 2020 (UTC)
The collapse template causes huge issues for accessibility. It is particularly problematic in infoboxes (where text is already reduced in size), but there is also a whole host of usage across music templates, navigation/category boxes at the bottom of pages and in tables that appear within articles. Can we go ahead and remove them from the article space? I can't see many legitimate reasons to have them in the article space, userspace maybe. ≫ Lil-Unique1 -{ Talk }- 23:11, 18 February 2021 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please apply these changes from the sandbox: [2] in order to remove the unnecessary font-size overrides affecting the show/hide button (it is smaller than usual). I'm also proposing the same changes at Template talk:Collapse top. Matma Rex talk 17:19, 23 January 2023 (UTC)
{{
Edit template-protected}}
template. Is there a discussion about this change? –
Jonesey95 (
talk)
17:40, 23 January 2023 (UTC)
What is this about specifically? Is it recommended in all usages? I don't understand this:
When is a time stamp involved with this template? -- Timeshifter ( talk) 10:49, 13 January 2024 (UTC)
Does anyone have any insight how often any of these styling options are actually used, considering that this is a subst template ? It creates such a mess to have so many options, and I just don't see why anyone would need all this. — TheDJ ( talk • contribs) 15:42, 17 April 2024 (UTC)
This is the
talk page for discussing improvements to the
Collapse template. |
|
Archives: 1 |
So is it just me, or is this template completely broken? It certainly looks nothing like the results of {{ Collapse top}} and {{ Collapse bottom}}. It just presents the content it is supposed to put a collapse box around, and puts an empty little box, with no controls, below that content. This is using Google Chrome, current non-dev version as of this writing, on Vista x64 SP 2. — SMcCandlish Talk⇒ ʕ(Õلō)ˀ Contribs. 11:28, 12 January 2010 (UTC)
Hi. Is it just me, or doesn't this template work with tables? Rehman( +) 01:01, 9 September 2010 (UTC)
Can we restrict this so it cannot be used in articles? It is structured in such a way that it will not show in the print version (navbox class). For example, try the "printable version" of pages like this page. For this reason, I think it should only be used on user pages and talk pages, but restricting to non-articlespace would be a good start. Frietjes ( talk) 22:28, 8 April 2011 (UTC)
Extended content
|
---|
None of the examples on
Template:Collapse/doc appear collapsed. When I preview edits the template appears collapsed, but when I save the edit it appears "uncollapsed".
|
Hyacinth ( talk) 01:19, 25 September 2012 (UTC)
Compare:
Code:
{{collapse|width=auto|title=Centered for no apparent reason|1={{lorem}}}}
Result:
Centered for no apparent reason
|
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
Even this code results in unwanted centering:
<div style="text-align: left;">{{collapse|left=y|width=auto|title=Still centered despite all efforts!|1={{lorem}}}}</div>
Result:
Still centered despite all efforts!
|
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
But this works "magically":
{| |- | {{collapse|width=auto|title=Left-aligned, as expected|1={{lorem}}}} |}
Result:
|
The only non-table version that seems to work is this:
<div style="float: left;">{{collapse|width=auto|title=Left-aligned with <code>float:left</code>|1={{lorem}}}}</div>
Result:
Left-aligned with
float:left |
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
But it requires {{
clear|left}}
(or HTML+CSS equivalent) after it, and seems like a blecherous, truly brute-force approach, not much better than the table. Maybe I just need more coffee or something. —
SMcCandlish ☺
☏
¢ ≽ʌⱷ҅ᴥⱷʌ≼
15:40, 7 August 2015 (UTC)
margin: 0.2em auto auto;
in the outer container.
Frietjes (
talk)
13:19, 8 August 2015 (UTC)
|width=auto
parameter (which means that the block may be less than 100% wide) with
this edit by
Ahecht (
talk ·
contribs) - if a block is less than 100% wide, and is not aligned to a margin, the css declaration margin: 0.2em auto auto;
(top margin 0.2em, other three margins automatic) causes horizontal centring of that block.text-align:
property affects text inside blocks (<div>...</div>
is a block-type element), it doesn't affect the alignment of the block as a whole, see
CSS 2.1 section 16.2; (ii) the |left=y
parameter applies the declaration text-align: left;
to a table cell (for our purposes, cells are also block-type elements), so it again affects text inside that cell, not the alignment of a cell.float:
property affects the alignment of a block.|width=auto;margin-left:0;
Left-aligned with
margin-left:0; |
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
width:
propeerty is set after the margin:
property, so is not guaranteed to be future-proof. --
Redrose64 (
talk)
13:52, 8 August 2015 (UTC)
|float=
... option to this template, and we should rewrite this one as a wrapper for {{
collapse top}}/{{
collapse bottom}} to reduce code duplication.
Frietjes (
talk)
13:57, 8 August 2015 (UTC)
|float=
, with no changes to the default behaviour.
Frietjes (
talk)
12:58, 23 July 2016 (UTC)This interaction was a bit old and might be hard to understand for people like me who don't have experience with CSS. This was kinda done above, but imo not clearly so here's what I ended up doing to have multiple collapsibles all left-aligned.
{{collapse | title = This is the title | width = auto | float = left |
This is a text body.
}} {{clear | left}}
Which renders as:
This is the title
|
---|
This is a text body. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
It's important to add the {{clear | left}}
at the end if you have multiple collapsibles on your page. Otherwise all of the boxes will use the first one's left margin.
— tr3ndybear 20:44 (UTC), 11 March 2020
I wanted to use this on w:ht:Wikipedya:Akèy nouvo arivan yo, to provide an English translation in a collapsed form. So I copied this, and then {{ main other}}, which it requires, but it still doesn't collapse the content. Am I missing something else? WhatamIdoing ( talk) 23:29, 6 February 2016 (UTC)
collapsible
uncollapsed
and collapsed
in the appropriate CSS files? Is the JavaScript that does the actual collapsing installed? --
Redrose64 (
talk)
08:28, 7 February 2016 (UTC)
border-collapse: collapse;
has nothing to do with it. This affects borders in tables:
|
|
With the example {{sidebar with collapsible lists}} what is the parameter to prevent a sidebar from being collapsible at all? Say with the {{Signpost-subscription}} template, how would I make it to where it doesn't collapse or where there is no option to collapse it? Book-Portal & Talk 11:11, 17 March 2016 (UTC)
|collapse=no
or really anything other than |collapse=yes
. if you have another example, I can try to help.
Frietjes (
talk)
16:34, 17 March 2016 (UTC)|content#=
fields instead of the |list#=
fields. however, if you are not going to have [show]/[hide] buttons, you should used {{
sidebar}} instead of {{
sidebar with collapsible lists}}. for example, the version I created for you and added
in this edit.
Frietjes (
talk)
17:05, 17 March 2016 (UTC)The most frequent use of this template (or the {{
Collapse top}}...{{
Collapse bottom}} pair) is to collapse off-topic blather, details only a few people will want to look at, and other "trivia", but the bright color attracts attention to it, when this is the opposite of the intended effect. I propose changing the default color of both templates to #D3D3D3
(a.k.a. LightGray
or LightGrey
:
Example!
|
---|
It really is just an example.
|
I find myself using this about 95% of the time, and it gets tiresome to keep adding the bg parameter.
PS: I agree with above suggestion to merge these templates (and their documentation), and just use one as the wrapper for the other so we don't have forked code. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 12:13, 12 April 2016 (UTC)
Note – The proposed background color is not AAA-compliant with the default link color (#0669AD). The current one might be OK as it's bold and larger than 14pt (~14px = ~18.5px). nyuszika7h ( talk) 14:28, 24 April 2016 (UTC)
Example!
|
---|
It really is just an example.
|
|bg=F0F2F5
. --
Izno (
talk)
14:51, 12 June 2016 (UTC)
|bg=#CCFFCC
or arbitrary color of interest. --
Izno (
talk)
15:08, 12 June 2016 (UTC)|bg=
parameter says, "Defaults to #CFC - a pleasant green." Is that not the old default value? I'm clueless as to your job queue reference. ―
Mandruss
☎
22:32, 12 June 2016 (UTC)
I'm fine being reverted @ Godsy, but I disagree about your read of consensus existing at this talk page (prior to the change). Of the people here who responded to the original discussion, only a single person (QEDK) objected to any change, with 4 others agreeing to a change, and a few of those agreeing to the exact change made (and I think the more logical change was in fact to the grey pointed out by Frietjes, for accessibility reasons, relative to the original grey proposed).
@ Mandruss: I indeed anticipated them but only due to the wide-reach of the template and for no other reason. Softlavender asked how to take care of it for his own personal use after the change, so a solution for him is present. SMC pointed out in re to QEDK that a separate template wouldn't fly at TFD, so that solution is out. Now I'm left with Godsy's "I don't like it/I like something else" and your own "see about getting a wider consensus"; both objections I feel to be of low value relative to the change (and its reasoning) proposed (that the template, unnecessarily, calls attention to information which we deliberately want to have collapsed).
@ Frietjes, Nyuszika7h, SMcCandlish, QEDK, and Bishonen, FYI. -- Izno ( talk) 11:19, 13 June 2016 (UTC)
WP:BURO is relevant to "that kind of reasoning". We don't need everyone's agreement prior to full-steaming ahead. Sometimes it's a good idea. Here? Questionably, since I agree with your comment regarding "it's a peanuts issue size-wise".
Regarding pinging, they're the ones who will want to take action to search for wider consensus, since I am going to have no dog in this fight, deliberately-so. The people involved are all familiar with what occurs after a reversion is made; I obviously and personally won't revert the reversion, per the WP:Template editor and WP:WHEEL warring guidelines. -- Izno ( talk) 12:05, 13 June 2016 (UTC)
|bg=#F0F2F5
in those collapses. ―
Mandruss
☎
16:01, 13 June 2016 (UTC){{
Cot|bg=lightgrey}}
. --
QEDK (
T ☕
C)
14:23, 14 June 2016 (UTC)Please see Template talk:Collapse top#RfC: Heading centered or left-aligned by default? for a multi-template discussion that includes this template. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 10:30, 20 April 2016 (UTC)
FYI, this template does not appear to work on mobile using Android and chrome. Not sure if that's helpful or not. TimothyJosephWood 22:27, 29 November 2016 (UTC) TimothyJosephWood 22:27, 29 November 2016 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I
changed the sandbox to use mw-collapsible
instead of collapsible
. The former is provided by MediaWiki core, so it makes the template easier to copy between wikis, and using it is a small step to the eventual removing of collapsible
from Common.js. –
Tacsipacsi (
talk)
15:29, 17 December 2017 (UTC)
![]() | This help request has been answered. If you need more help, you can , contact the responding user(s) directly on their user talk page, or consider visiting the Teahouse. |
I want to copy the vastly simplified version of this template at User:Launchballer/sandbox to http://wiki.apterous.org, but it isn't collapsing when I copy it over. The documentation suggests the template depends upon having rules for the three classes (collapsible, uncollapsed, and collapsed) in the appropriate CSS files, and some related JavaScript installed - where would I check?-- Laun chba ller 03:40, 2 June 2020 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please remove the font size changes and the unneeded span tag. Now the table cell for the title is set with font size 88%, and the title is then again set with a span tag with font size 115%. This calculates to 100,05%. If we instead just use the default 100% we get the same font size and also fixes a few Special:LintErrors. See this edit in sandbox for the change. Tholme ( talk) 15:03, 9 June 2020 (UTC)
<span>
with
TemplateStyles: /* The collapsible toggle when it actually works */
.collapse-template-header > .mw-collapsible-toggle,
/* The collapsible toggle during page load, when it’s still just a placeholder */
.collapse-template-header::before {
font-size: 87%;
}
class="collapsible-template-header"
to the header cell). This way the simple syntax is kept, but the small toggle returns. The only issue with this approach is that this template is designed to be substituteable, and having raw <templatestyles> tags in non-template namespace is not a nice thing. I don’t know how much it’s actually substituted, though. —
Tacsipacsi (
talk)
13:13, 11 June 2020 (UTC)
However, the larger problem is that if these are stacked next to each other for whatever reason, then there will need to be CSS that accounts for the fact that it is nowIn templates intended to be substituted, or those likely to be substituted, use {{ ifsubst}} to remove the TemplateStyles tag. Example: {{ allcaps}}. Inline styles may be used as the "if substed" case in a substituted template. Example: {{ smallcaps}}.
.mw-collapsible + link + .mw-collapsible
, rather than .mw-collapsible + .mw-collapsible
.--
Izno (
talk)
13:26, 11 June 2020 (UTC)
::before
cannot be targeted with inline CSS, while the .mw-collapsible-toggle
could in theory, but isn’t present in the wikitext. Stacking is less of an issue, as putting the TemplateStyles tag within the header cell works it around (that’s not a particularly elegant solution, but at least it works). —
Tacsipacsi (
talk)
19:52, 11 June 2020 (UTC)
curently: In these templates, one has to click the [show]/[hide] text to expand/collapse the content. This isn't ideal on wide screens where the title and the toggle can be far apart.
proposed: On some other wikis, it is possible to simply click anywhere on the template (
example), and so it responds better to different pagewidths.
Thoughts and opinions?
T.Shafee(Evo&Evo)
talk
09:08, 13 June 2020 (UTC)
The collapse template causes huge issues for accessibility. It is particularly problematic in infoboxes (where text is already reduced in size), but there is also a whole host of usage across music templates, navigation/category boxes at the bottom of pages and in tables that appear within articles. Can we go ahead and remove them from the article space? I can't see many legitimate reasons to have them in the article space, userspace maybe. ≫ Lil-Unique1 -{ Talk }- 23:11, 18 February 2021 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please apply these changes from the sandbox: [2] in order to remove the unnecessary font-size overrides affecting the show/hide button (it is smaller than usual). I'm also proposing the same changes at Template talk:Collapse top. Matma Rex talk 17:19, 23 January 2023 (UTC)
{{
Edit template-protected}}
template. Is there a discussion about this change? –
Jonesey95 (
talk)
17:40, 23 January 2023 (UTC)
What is this about specifically? Is it recommended in all usages? I don't understand this:
When is a time stamp involved with this template? -- Timeshifter ( talk) 10:49, 13 January 2024 (UTC)
Does anyone have any insight how often any of these styling options are actually used, considering that this is a subst template ? It creates such a mess to have so many options, and I just don't see why anyone would need all this. — TheDJ ( talk • contribs) 15:42, 17 April 2024 (UTC)