Template talk:Umbox

(Redirected from Template talk:Umbox/sandbox)
Latest comment: 2 months ago by Jonesey95 in topic Edit request for dark mode compatibility

Edit request

edit

Replace "font-weight: bold;" with the following:

{{#if:{{{bold|}}}||font-weight: bold;}}

This makes bolding the text optional, but still the default setting. Thanks in advance, HeyMid (contribs) 16:49, 27 August 2011 (UTC)Reply

Perhaps it would be better to add a {{{style}}} parameter which would allow any custom styling? Then you could use |style=font-weight:normal; for the same result. — Martin (MSGJ · talk) 20:11, 29 August 2011 (UTC)Reply
Yeah, I guess that'd work too. As this template is only supposed to be used for making creation of new templates easier, we can assign one parameter for all styling options. Perphaps this: <div style="{{{style|background-color: #BBDDFF; border: #4169E1 1px solid; margin: 2em 0 1em; padding: 0.5em 1em; font-weight: bold; vertical-align: middle;}}}"> HeyMid (contribs) 19:44, 30 August 2011 (UTC)Reply
No because then if style was used to change one setting, all the other settings would be lost. Perhaps better to do <div style="background-color: #BBDDFF; border: #4169E1 1px solid; margin: 2em 0 1em; padding: 0.5em 1em; font-weight: bold; vertical-align: middle; {{{style|}}}"> as a later definition should override an earlier one? — Martin (MSGJ · talk) 08:47, 31 August 2011 (UTC)Reply
Sorry for not realizing that you meant it that way; I didn't think that writing the same parameter again overwrites the first. But I've tested it, and it works, so adding a style parameter after all existing style options can be done. HeyMid (contribs) 12:31, 31 August 2011 (UTC)Reply
Okay, deployed. — Martin (MSGJ · talk) 15:31, 31 August 2011 (UTC)Reply

Perhaps it would be better if the default was non-bold? — Martin (MSGJ · talk) 08:38, 1 September 2011 (UTC)Reply

Looking at the transclusions log, three templates (excluding the subpages and the testcases) use this template, so it wouldn't be hard to have it "normal" by default. But, Template:You've got mail, based on Template:Talkback, has parameters for signature while the latter doesn't (only timestamp). But I guess that most templates based on this one use bold for the main text. I think we can let everything be as-is, but I don't have a clear opinion either way. HeyMid (contribs) 16:04, 1 September 2011 (UTC)Reply
I guess bold is okay for very short messages, but I just converted Template:Nowikify/content to use this, and for long messages you don't want bold. — Martin (MSGJ · talk) 20:53, 1 September 2011 (UTC)Reply

Substitution

edit

Unless I shortly hear any objections, i am going to make this template substitutable. It is used on talk pages a lot, so the functionality is desirable. Magog the Ogre (talk) 22:57, 31 October 2011 (UTC)Reply

Which templates do you want to substitute specifically? I note that {{tb}} and some others advise not to substitute it. — Martin (MSGJ · talk) 10:43, 1 November 2011 (UTC)Reply

Well, I'm going to add the safesubst parameter to it anyway; the only reason it says that is because it makes it easier to remove from the page by the receiving user (who may be a n00b and not know how to remove it). And some users (such as myself) prefer it to be substituted, perhaps because I'm anal retentive or something, I don't know. But the point is it is an ideal substitution candidate for both of the templates that employ it, and it would make life easier on some of us. Magog the Ogre (talk) 10:58, 1 November 2011 (UTC)Reply

I must say that I can't see any advantages of substituting {{tb}} or {{ygm}}. Perhaps you could explain why you prefer it is substituted? In some cases, user talk templates should not be substituted because if someone changes the template they will effectively be changing someone else's post. But in both these cases, they are standard messages with nothing personal or customisable so this doesn't seem to apply. — Martin (MSGJ · talk) 13:07, 1 November 2011 (UTC)Reply

Because it maintains the apperance of the template as it was originally intended on the page. This is the same reason we substitute other talk page templates. Magog the Ogre (talk) 23:28, 5 November 2011 (UTC)Reply

Overflow?

edit

Would somebody be so kind as to pass overflow:auto; inside the <div style="........."> there. That would, I think (based on my own little experiment), keep {{tb}} templates from obtrusively flowing over my TOC. If somebody could give another solution to this minor problem that would also be highly appreciated. Mr T(Talk?) (New thread?) 19:26, 20 December 2012 (UTC)Reply

Update: The exact first line of template code would be then
<div style="background-color: #BBDDFF; border: #4169E1 1px solid; margin: 2em 0 1em; padding: 0.5em 1em; 
font-weight: bold; overflow:auto; vertical-align: middle; {{{style|}}}">
Thank you and Happy New Year 2013. Mr T(Talk?) (New thread?) 05:51, 1 January 2013 (UTC)Reply
Support: Hi. I can't think of a problem with this request but I have prepared a testcase anyway. Please see Template:Umbox/testcases. Best regards, Codename Lisa (talk) 07:32, 1 January 2013 (UTC)Reply
  Done I've made the edit. Next time you should use the {{edit protected}} template to make sure that your request gets seen by an admin. Best — Mr. Stradivarius (have a chat) 10:26, 1 January 2013 (UTC)Reply

Edit request for dark mode compatibility

edit
Please merge changes in Template:Umbox/sandbox for dark mode compatibility, you can also see testcasesMatrix(!) {user - talk? - uselesscontributions} 15:59, 6 September 2024 (UTC)Reply
  DoneJonesey95 (talk) 22:35, 7 September 2024 (UTC)Reply