![]() | This template was considered for deletion on 26 August 2011. The result of the discussion was "keep". |
This is the
talk page for discussing improvements to the
Divbox template. |
|
This portion of the discussion is now closed. Please do not alter or edit it in any way. Those who wish to continue the debate may do so at the bottom of this main section (Discussion).
(note this material originally appeared in Wikipedia talk: Templates for deletion#Tag location (process); this text has been edited for clarity and pertinence)
( Korath commmented (1) that {message box} should be preferred to {divbox} and (2) that the several so-called subtemplates of {divbox} are useless in any other context.)
Actually, the subtemplates are not useless outside of {{ divbox}}. I don't write junky code if I can help it. The {divstyleKEYWORD} templates are usable as is anywhere anyone wants a ready-made, color-coordinated, fully appreciated specification for colors, margins, and padding. Especially if {divbox} were somehow taken away, the subtemplates would become all the more useful to editors thus forced to "roll their own".
Template:Message_box sucks; with all respect to its creator, it was written by somebody with little experience writing code for naive users, and no experience in graphic design. It gives too much freedom to the user, demands the user master too much technical stuff, and makes the user work too hard to achieve a simple end. Too much hair is exposed, making it more likely for a naive user to break something. The documentation is impenetrable.
In contrast, {divbox} gives the user freedom, but not unlimited -- unless he substs it in and edits the code by hand, which is always available -- or he writes a new style subtemplate, which is also always available. It puts soft limits around the range of possible box styles. It's easy to use. And the only keywords the user must remember are simple mnemonics, like "blue" and "amber". If the naive user copies an instance of {divbox} from one place and uses it elsewhere, and foolishly changes the color style parameter without looking at the template documentation -- say, from "amber" to "green" -- he may not get the exact result he expects, but it will be pretty damn close, and nothing breaks. —
Xiong
talk 05:15, 2005 Apr 7 (UTC)
I'd like boxes like this to use for content, is that a good idea? I think we should have the possibility. Someone added a red box to High Middle Ages; I saw that the code was ugly and I cleaned it up by using this template. Using this template for content is wrong, however, because of two reasons:
So, can I create a derivative of this for factboxes? Ideally, it would use the same styles so we don't have to duplicate those. I'll try some experiments, but I don't think I can solve this myself. Regards. — Sverdrup 13:19, 22 Jun 2005 (UTC)
Complaints were made (in another context) about eyestrain. I've edited the highly saturated cyan of {{ divstyleblue}} to a more tolerable light blue. John Reid 06:10, 1 September 2006 (UTC)
-- and again. John Reid 10:18, 11 September 2006 (UTC)
I was thinking that my version might be more appropriate for the job. ~ Flame vip e r 17:20, 26 October 2006 (UTC)
We need a category for "box" templates, like this, {{ message box}}, and so on. I'm specifically looking for a simple template to put a box around examples to set them off from the text. Like you could have a code example and then an example of what that code outputs, with a box around the output to separate it from the text. Like {{box|here is some text}} would result in:
— Omegatron 19:47, 13 December 2006 (UTC)
Someone broke this template... And I don't see exactly where it happened in the history. Can someone fix it please? -- Falcorian (talk) 22:15, 21 April 2008 (UTC)
I started my own investigation of this problem (see User:B.C.Schmerker/Templates/Divbox (debugging)), and it appears that the "If exist Parameter 2" code is broken, resulting in this Template's reported malfunction. Recommend double-check the following syntax:
{{#if:{{{2|}}}|id="{{{2}}}"|}}
— B. C. Schmerker ( talk) 04:10, 9 July 2008 (UTC)
Hi. I've removed this addition pending some discussion. I'd like to know more about why decoration is to be avoided in other spaces and where consensus for that is documented. :) -- Moonriddengirl (talk) 13:01, 5 September 2011 (UTC)
"Multiple people use this in multiple places" is not evidence: it's an anecdote. I'm not spending any more time engaging in whataboutery with no concrete examples. My own investigation suggests that the vast majority of non-userspace transclusions can be removed without anyone batting an eyelid, so I'm going to work on doing that. Chris Cunningham (user:thumperward) - talk 09:39, 7 September 2011 (UTC)
Is there a way that this can be altered to allow multiple paragraphs of text in the body of the message text? So far I have yet to find any of the quote or div box type temples that allow multiple paragraph content in them without having to manually add multiple line breaks which is a very clumsy, and visually awkward work-around (the line spacing of a single line break is too little space, and two line-breaks is way too much space. Any solutions to this would be highly appreciated. Lestatdelc ( talk) 23:42, 17 March 2012 (UTC)
This template is used in a number of edit notices, and recent changes destroyed that functionality. When I reverted back to version as of 11:15, 17 May 2012, it again worked. I've restored it until that issue can be worked around. -- Moonriddengirl (talk) 20:20, 17 May 2012 (UTC)
I am confused. A divbox like this
{{divbox|gray||foo [http://example.com/a=b bar] baz}}
causes the entire content of the divbox to disappear but
{{divbox|gray||foo [[http://example.com/a=b bar]] baz}}
works fine. What's going on here? It seems like the equals sign (=) is confusing the template parameter code, but why? Is this fixable? Aren't links supposed to be given in single brackets? jhawkinson ( talk) 08:48, 17 May 2013 (UTC)
foo [http://example.com/a
and its value is b bar] baz
. To defeat this, you need to explicitly number the parameter, as in{{divbox|gray||3=foo [http://example.com/a=b bar] baz}}
Is there a way that we can use this template in actual articles? I'm looking for some way to create a dividing border between several family trees in a section, and I thought that this template worked pretty well for that [1]. Can someone point me to a similar border template for article space?-- Brianann MacAmhlaidh ( talk) 01:25, 3 September 2013 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change |id="{{{2}}}"
to |title="{{{2}}}"
. An id has to be an unique element on any page, and that would be breached by having more than one box with the same title on a page. The documentation page is a prime example and produces invalid html:
I assume the id attribute was added because ancient versions of IE used it to show a tooltip on hover. In 2015 there's no reason why the div should have an id attribute, although a title attribute might provide some of the functionality originally intended.
You might want to consider opening the template up for editing by template-editors. -- RexxS ( talk) 18:32, 22 May 2015 (UTC)
I imported all of these to my wiki. I edited them by changing [[Category:Wikipedia formatting and function templates|{{PAGENAME}}]] to [[Category:Formatting and function templates|{{PAGENAME}}]]. I noticed that almost all of the templates are missing categorization. The fix is very simple. Just add the category within the doc content after the divbox display. If this should be done, I would be willing to do it.
Also, some of the styles uee border radius and others do not. Is this intentional? I would have expected the styles of all the boxes to be identical. I think an editor would expect that.
Finally, the grey template redirects to gray and differs from all the rest. It has no documentation at all.
{{
Divbox}}
, which is categorized as
Category:Box templates but not
Category:Wikipedia formatting and function templates and {{
Divbox/style/gold}}
, which is categorized as
Category:Wikipedia formatting and function templates. The rest are uncategorized.{{
Divbox#Parameters}}
, you'll see that {{
Divbox/style/fawn}}
, {{
Divbox/style/ivory}}
and {{
Divbox/style/simar}}
have rounded corners (use border-radius) while none of the others do, and {{
Divbox/style/lilac}}
and {{
Divbox/style/wordperfect}}
have no border at all. ({{
Divbox/style/none}}
, {{
Divbox/style/greenv}}
and {{
Divbox/style/grayh}}
also have no borders, but those make sense to me, because of their design.){{
Divbox/style/gray}}
presents itself completely different from the others. If you look at it, there is no doc, and even the <noinclude></noinclude> is displayed on the screen. I tried adding a doc section to it on my wiki, but it displays the raw
wikitext as well.{{
Divbox/style/sia}}
, {{
Divbox/style/siaaa}}
, {{
Divbox/style/berk}}
, {{
Divbox/style/darkgreen}}
, {{
Divbox/style/gamessage}}
, {{
Divbox/style/gray99}}
, {{
Divbox/style/lightblue}}
, {{
Divbox/style/n}}
, {{
Divbox/style/nyanza}}
, {{
Divbox/style/thistle}}
, {{
Divbox/style/teal}}
and {{
Divbox/style/wdl}}
are not even displayed in the {{
Divbox#Parameters}}
section.{{
Divbox#Parameters}}
.{{
Divbox/style/gray}}
to CSS? Was this discussed anywhere? --
Redrose64 🌹 (
talk)
10:59, 13 November 2017 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
@ Redrose64: These edits replace current sub-template system with Template:Divbox/styles.css. I've made the edits in the sandbox. It passes the test cases and some of my own testing. Using Template:Divbox/styles.css is more organized and makes it easier to add a box as .css pages identify errors while editing. – BrandonXLF (t@lk) 01:24, 14 September 2018 (UTC)
<div>
? Why hasn't all of the inline styling been moved to TemplateStyles? The classes being targeted by the TemplateStyles CSS are not unique, to prevent conflicts with other selectors. —
JJMC89 (
T·
C)
20:17, 15 September 2018 (UTC)
</div>
. —
JJMC89 (
T·
C)
04:07, 16 September 2018 (UTC)
</div>
, thanks. I didn't answer your questions because I addressed them by editing the sandbox and /styles.css. –
BrandonXLF
(t@lk)
15:06, 16 September 2018 (UTC)
<div>...</div>
now? —
JJMC89 (
T·
C)
19:58, 16 September 2018 (UTC)
style="border-radius:{{{radius|}}}"
does not result in the same style. I don't see a good reason to remove {{border-radius}} and {{
center}}. —
JJMC89 (
T·
C)
04:29, 17 September 2018 (UTC)
Not done please establish consensus for the change by completing the discussion above, then feel free to reactivate the edit request. —
xaosflux
Talk
20:04, 20 September 2018 (UTC)
Done as
JJMC89 implemented it. –
BrandonXLF
:(t@lk)
20:20, 26 September 2018 (UTC)
![]() | This
edit request to
Template:Divbox/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Replace
.divbox-gray {
with
.divbox-gray, .divbox-grey {
To allow for the British and Canadian spelling for grey. – BrandonXLF (t@lk) 12:31, 12 October 2018 (UTC)
![]() | This template was considered for deletion on 26 August 2011. The result of the discussion was "keep". |
This is the
talk page for discussing improvements to the
Divbox template. |
|
This portion of the discussion is now closed. Please do not alter or edit it in any way. Those who wish to continue the debate may do so at the bottom of this main section (Discussion).
(note this material originally appeared in Wikipedia talk: Templates for deletion#Tag location (process); this text has been edited for clarity and pertinence)
( Korath commmented (1) that {message box} should be preferred to {divbox} and (2) that the several so-called subtemplates of {divbox} are useless in any other context.)
Actually, the subtemplates are not useless outside of {{ divbox}}. I don't write junky code if I can help it. The {divstyleKEYWORD} templates are usable as is anywhere anyone wants a ready-made, color-coordinated, fully appreciated specification for colors, margins, and padding. Especially if {divbox} were somehow taken away, the subtemplates would become all the more useful to editors thus forced to "roll their own".
Template:Message_box sucks; with all respect to its creator, it was written by somebody with little experience writing code for naive users, and no experience in graphic design. It gives too much freedom to the user, demands the user master too much technical stuff, and makes the user work too hard to achieve a simple end. Too much hair is exposed, making it more likely for a naive user to break something. The documentation is impenetrable.
In contrast, {divbox} gives the user freedom, but not unlimited -- unless he substs it in and edits the code by hand, which is always available -- or he writes a new style subtemplate, which is also always available. It puts soft limits around the range of possible box styles. It's easy to use. And the only keywords the user must remember are simple mnemonics, like "blue" and "amber". If the naive user copies an instance of {divbox} from one place and uses it elsewhere, and foolishly changes the color style parameter without looking at the template documentation -- say, from "amber" to "green" -- he may not get the exact result he expects, but it will be pretty damn close, and nothing breaks. —
Xiong
talk 05:15, 2005 Apr 7 (UTC)
I'd like boxes like this to use for content, is that a good idea? I think we should have the possibility. Someone added a red box to High Middle Ages; I saw that the code was ugly and I cleaned it up by using this template. Using this template for content is wrong, however, because of two reasons:
So, can I create a derivative of this for factboxes? Ideally, it would use the same styles so we don't have to duplicate those. I'll try some experiments, but I don't think I can solve this myself. Regards. — Sverdrup 13:19, 22 Jun 2005 (UTC)
Complaints were made (in another context) about eyestrain. I've edited the highly saturated cyan of {{ divstyleblue}} to a more tolerable light blue. John Reid 06:10, 1 September 2006 (UTC)
-- and again. John Reid 10:18, 11 September 2006 (UTC)
I was thinking that my version might be more appropriate for the job. ~ Flame vip e r 17:20, 26 October 2006 (UTC)
We need a category for "box" templates, like this, {{ message box}}, and so on. I'm specifically looking for a simple template to put a box around examples to set them off from the text. Like you could have a code example and then an example of what that code outputs, with a box around the output to separate it from the text. Like {{box|here is some text}} would result in:
— Omegatron 19:47, 13 December 2006 (UTC)
Someone broke this template... And I don't see exactly where it happened in the history. Can someone fix it please? -- Falcorian (talk) 22:15, 21 April 2008 (UTC)
I started my own investigation of this problem (see User:B.C.Schmerker/Templates/Divbox (debugging)), and it appears that the "If exist Parameter 2" code is broken, resulting in this Template's reported malfunction. Recommend double-check the following syntax:
{{#if:{{{2|}}}|id="{{{2}}}"|}}
— B. C. Schmerker ( talk) 04:10, 9 July 2008 (UTC)
Hi. I've removed this addition pending some discussion. I'd like to know more about why decoration is to be avoided in other spaces and where consensus for that is documented. :) -- Moonriddengirl (talk) 13:01, 5 September 2011 (UTC)
"Multiple people use this in multiple places" is not evidence: it's an anecdote. I'm not spending any more time engaging in whataboutery with no concrete examples. My own investigation suggests that the vast majority of non-userspace transclusions can be removed without anyone batting an eyelid, so I'm going to work on doing that. Chris Cunningham (user:thumperward) - talk 09:39, 7 September 2011 (UTC)
Is there a way that this can be altered to allow multiple paragraphs of text in the body of the message text? So far I have yet to find any of the quote or div box type temples that allow multiple paragraph content in them without having to manually add multiple line breaks which is a very clumsy, and visually awkward work-around (the line spacing of a single line break is too little space, and two line-breaks is way too much space. Any solutions to this would be highly appreciated. Lestatdelc ( talk) 23:42, 17 March 2012 (UTC)
This template is used in a number of edit notices, and recent changes destroyed that functionality. When I reverted back to version as of 11:15, 17 May 2012, it again worked. I've restored it until that issue can be worked around. -- Moonriddengirl (talk) 20:20, 17 May 2012 (UTC)
I am confused. A divbox like this
{{divbox|gray||foo [http://example.com/a=b bar] baz}}
causes the entire content of the divbox to disappear but
{{divbox|gray||foo [[http://example.com/a=b bar]] baz}}
works fine. What's going on here? It seems like the equals sign (=) is confusing the template parameter code, but why? Is this fixable? Aren't links supposed to be given in single brackets? jhawkinson ( talk) 08:48, 17 May 2013 (UTC)
foo [http://example.com/a
and its value is b bar] baz
. To defeat this, you need to explicitly number the parameter, as in{{divbox|gray||3=foo [http://example.com/a=b bar] baz}}
Is there a way that we can use this template in actual articles? I'm looking for some way to create a dividing border between several family trees in a section, and I thought that this template worked pretty well for that [1]. Can someone point me to a similar border template for article space?-- Brianann MacAmhlaidh ( talk) 01:25, 3 September 2013 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change |id="{{{2}}}"
to |title="{{{2}}}"
. An id has to be an unique element on any page, and that would be breached by having more than one box with the same title on a page. The documentation page is a prime example and produces invalid html:
I assume the id attribute was added because ancient versions of IE used it to show a tooltip on hover. In 2015 there's no reason why the div should have an id attribute, although a title attribute might provide some of the functionality originally intended.
You might want to consider opening the template up for editing by template-editors. -- RexxS ( talk) 18:32, 22 May 2015 (UTC)
I imported all of these to my wiki. I edited them by changing [[Category:Wikipedia formatting and function templates|{{PAGENAME}}]] to [[Category:Formatting and function templates|{{PAGENAME}}]]. I noticed that almost all of the templates are missing categorization. The fix is very simple. Just add the category within the doc content after the divbox display. If this should be done, I would be willing to do it.
Also, some of the styles uee border radius and others do not. Is this intentional? I would have expected the styles of all the boxes to be identical. I think an editor would expect that.
Finally, the grey template redirects to gray and differs from all the rest. It has no documentation at all.
{{
Divbox}}
, which is categorized as
Category:Box templates but not
Category:Wikipedia formatting and function templates and {{
Divbox/style/gold}}
, which is categorized as
Category:Wikipedia formatting and function templates. The rest are uncategorized.{{
Divbox#Parameters}}
, you'll see that {{
Divbox/style/fawn}}
, {{
Divbox/style/ivory}}
and {{
Divbox/style/simar}}
have rounded corners (use border-radius) while none of the others do, and {{
Divbox/style/lilac}}
and {{
Divbox/style/wordperfect}}
have no border at all. ({{
Divbox/style/none}}
, {{
Divbox/style/greenv}}
and {{
Divbox/style/grayh}}
also have no borders, but those make sense to me, because of their design.){{
Divbox/style/gray}}
presents itself completely different from the others. If you look at it, there is no doc, and even the <noinclude></noinclude> is displayed on the screen. I tried adding a doc section to it on my wiki, but it displays the raw
wikitext as well.{{
Divbox/style/sia}}
, {{
Divbox/style/siaaa}}
, {{
Divbox/style/berk}}
, {{
Divbox/style/darkgreen}}
, {{
Divbox/style/gamessage}}
, {{
Divbox/style/gray99}}
, {{
Divbox/style/lightblue}}
, {{
Divbox/style/n}}
, {{
Divbox/style/nyanza}}
, {{
Divbox/style/thistle}}
, {{
Divbox/style/teal}}
and {{
Divbox/style/wdl}}
are not even displayed in the {{
Divbox#Parameters}}
section.{{
Divbox#Parameters}}
.{{
Divbox/style/gray}}
to CSS? Was this discussed anywhere? --
Redrose64 🌹 (
talk)
10:59, 13 November 2017 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
@ Redrose64: These edits replace current sub-template system with Template:Divbox/styles.css. I've made the edits in the sandbox. It passes the test cases and some of my own testing. Using Template:Divbox/styles.css is more organized and makes it easier to add a box as .css pages identify errors while editing. – BrandonXLF (t@lk) 01:24, 14 September 2018 (UTC)
<div>
? Why hasn't all of the inline styling been moved to TemplateStyles? The classes being targeted by the TemplateStyles CSS are not unique, to prevent conflicts with other selectors. —
JJMC89 (
T·
C)
20:17, 15 September 2018 (UTC)
</div>
. —
JJMC89 (
T·
C)
04:07, 16 September 2018 (UTC)
</div>
, thanks. I didn't answer your questions because I addressed them by editing the sandbox and /styles.css. –
BrandonXLF
(t@lk)
15:06, 16 September 2018 (UTC)
<div>...</div>
now? —
JJMC89 (
T·
C)
19:58, 16 September 2018 (UTC)
style="border-radius:{{{radius|}}}"
does not result in the same style. I don't see a good reason to remove {{border-radius}} and {{
center}}. —
JJMC89 (
T·
C)
04:29, 17 September 2018 (UTC)
Not done please establish consensus for the change by completing the discussion above, then feel free to reactivate the edit request. —
xaosflux
Talk
20:04, 20 September 2018 (UTC)
Done as
JJMC89 implemented it. –
BrandonXLF
:(t@lk)
20:20, 26 September 2018 (UTC)
![]() | This
edit request to
Template:Divbox/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Replace
.divbox-gray {
with
.divbox-gray, .divbox-grey {
To allow for the British and Canadian spelling for grey. – BrandonXLF (t@lk) 12:31, 12 October 2018 (UTC)