Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a225a77a695ac892

Jump to content

Template talk:Box

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 1 month ago by Zackmann08 in topic Template-protected edit request on 25 June 2026

Untitled 2018 comments

[edit]

Any box with wider padding as usable for larger body of text? -Inowen (nlfte) 21:14, 24 August 2018 (UTC)Reply

@Inowen: Can't you increase|padding=?  BrandonXLF  (t@lk | ping back) 19:09, 25 August 2018 (UTC)Reply

Documentation typo

[edit]

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)Reply

 Done Thanks for catching this. Jamedeus (talk) 07:56, 6 March 2024 (UTC)Reply

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)Reply

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)Reply

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)Reply

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.

Special parameters
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

black

,

white

or

transparent

|inline=
Set the box to be inline

text text text

yes

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)Reply

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 inline or 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=yes instead for use mid-paragraph. Izno (talk) 19:51, 25 May 2026 (UTC)Reply
Izno: If I were Jean-Luc Picard I would say "Make it so." —Anomalocaris (talk) 21:28, 25 May 2026 (UTC)Reply

Template-protected edit request on 25 June 2026

[edit]

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)Reply

@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)Reply
It's now synced with the normal template (+my changes). Axolitl (talk | contribs) 04:41, 26 June 2026 (UTC)Reply
Edit: for some reason the pixel border changed? I fixed it. Axolitl (talk | contribs) 04:43, 26 June 2026 (UTC)Reply
 Done Zackmann (Talk to me/What I been doing) 04:47, 26 June 2026 (UTC)Reply