Template talk:Box
Add topicUntitled 2018 comments
[edit]Any box with wider padding as usable for larger body of text? -Inowen (nlfte) 21:14, 24 August 2018 (UTC)
- @Inowen: Can't you increase
|padding=? – BrandonXLF (t@lk | ping back) 19:09, 25 August 2018 (UTC)
Documentation typo
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Pretty clearly the CSS generated for |border color= is not related to 'background-color', as the current /doc page indicates. Please change this to 'border-color' (— 𝐬𝐝𝐒𝐝𝐬 — - talk) 03:07, 6 March 2024 (UTC)
Done Thanks for catching this. Jamedeus (talk) 07:56, 6 March 2024 (UTC)
Dark mode updates would be helpful
[edit]Currently, this template defaults to black text on a white background, instead of being responsive to whether the template is being rendered in normal or dark mode. Some elegant updates would be helpful. mw:Help:Lint_errors/night-mode-unaware-background-color provides some guidance. – Jonesey95 (talk) 14:17, 9 December 2024 (UTC)
- Agreed. How about making backgound (color) and text color "inherit" by default? This seems to work with type "transparent" at least. Pizzahut2 (talk) 18:10, 8 April 2025 (UTC)
Option to not underline header would be nice
[edit]I still want to use a header, to get the bolding and so it will be on a separate line, but I don't want the underlining. Herostratus (talk) 15:30, 23 March 2025 (UTC)
Template doesn't inline when outside table cells
[edit]Pppery, Jonesey95, Great Brightstar, Izno, Frietjes, Plastikspork, User:BrandonXLF: The documentation examples for this template show its use inside table cells, where it behaves as described. But when used outside table cells, this template displays on its own line. Compare examples from the §Parameters table, with the table and without.
| Parameter | Description | Values |
|---|---|---|
|type= |
The type of box | black , white or transparent |
|inline= |
Set the box to be inline | text text text yes text text text |
|type=
The type of box
,
or
|inline=
Set the box to be inline
text text text
text text text
I assume this doesn't affect anything, but my I'm using Windows 11 and Mozilla Firefox. Will someone please fix this template so that it behaves the same outside table cells as it does inside table cells? —Anomalocaris (talk) 19:34, 25 May 2026 (UTC)
- A div is flow content, not phrasing content. Paragraphs allow only phrasing content, while table cells allow flow content. This means that all divs will appear outside all paragraphs. As the paragraphs in question are not also styled as
inlineor some variant, they will not display inline with the boxes. Fixing the documentation is the correct approach, to make it clear that the box must be marked with|span=yesinstead for use mid-paragraph. Izno (talk) 19:51, 25 May 2026 (UTC)- Izno: If I were Jean-Luc Picard I would say "Make it so." —Anomalocaris (talk) 21:28, 25 May 2026 (UTC)
Template-protected edit request on 25 June 2026
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Currently, the default and transparent boxes are illegible on dark mode. I have addressed these on the sandbox.
Change border-color: {{{border color|{{#switch:{{{type}}}|black=black|white=white|transparent=transparent||#default=black}}}}};<!--
-->border-width: {{{border size|{{#switch:{{{type}}}|black|white|transparent=0px|#default=2px}}}}};<!--
-->background-color: {{{color|{{{background|{{#switch:{{{type}}}|black=black|white=white|transparent=transparent|#default=white}}}}}}}};<!--
-->color: {{{text color|{{#switch:{{{type}}}|black=white|white|transparent=black|#default=black}}}}};
to
border-color: {{{border color|{{#switch:{{{type}}}|black=black|white=white|transparent=transparent||#default=var(--border-color-emphasized, #000000)}}}}};<!--
-->border-width: {{{border size|{{#switch:{{{type}}}|black|white|transparent=0px|#default=2px}}}}};<!--
-->background-color: {{{color|{{{background|{{#switch:{{{type}}}|black=black|white=white|transparent=transparent|#default=var(--color-inverted, #ffffff)}}}}}}}};<!--
-->color: {{{text color|{{#switch:{{{type}}}|black=white|white=black|transparent|#default=var(--color-base, #000000)}}}}}; Axolitl (talk | contribs) 21:37, 25 June 2026 (UTC)
- @Axolitl: the sandbox diff shows a number of unrelated changes compared to the main version. Can you please sync the sandbox to main first and then do your changes for easier comparison? (User:Enterprisey/sync-template-sandbox.js is super helpful). Zackmann (Talk to me/What I been doing) 04:37, 26 June 2026 (UTC)
- It's now synced with the normal template (+my changes). Axolitl (talk | contribs) 04:41, 26 June 2026 (UTC)
- Edit: for some reason the pixel border changed? I fixed it. Axolitl (talk | contribs) 04:43, 26 June 2026 (UTC)
- It's now synced with the normal template (+my changes). Axolitl (talk | contribs) 04:41, 26 June 2026 (UTC)
Done Zackmann (Talk to me/What I been doing) 04:47, 26 June 2026 (UTC)