wml::std::box(3)

πŸ“¦
version 2.32.0 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing

πŸ’– wml::std::box β€” bestie, we're building BOXES πŸ’–

okay so this is wml::std::box(3) from the EN Tools manual, and it's literally the cutest little thing: it makes rectangular boxes. that's it. that's the whole job. and it ATE. πŸŽ€


✨ NAME ✨

wml::std::box β€” Easily Create Rectangular Box

like, the name is the whole vibe. no notes. πŸ‘‘


🌸 SYNOPSIS 🌸

#use wml::std::box

<box [attributes]>
...
</box>

see how clean that is?? #use it, wrap your stuff in <box>, boom. done. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the <box> container tag takes whatever you put inside it and puts it in a nice rectangular box β€” and that box is built using an HTML <table> construct under the hood. it's giving "hiding the machinery behind a cute face," which honestly? iconic. ✨


πŸ’œ ATTRIBUTES πŸ’œ

every one of these goes on the <box> tag and each one is doing its own little job. let's go through them fr fr.

  • header β€” this one is a whole personality switch, no cap. it flips between two totally different box variants. when header is present, you get a headlined box, made using one single table but with space GIFs. when header is missing, you get a standard box, made using two nested tables but without any space GIFs. two different builds, two different looks. pick your fighter. πŸ₯Š
  • bgcolor β€” sets the background color of the box. the box's outfit. πŸ’–
  • fgcolor β€” sets the foreground (text) color of the box. the box's lip gloss. πŸ’„
  • bdcolor β€” sets the color for the border of the box. lowkey the drama of this one is that it automatically generates a nested table construct to achieve the optical effect. it's doing extra work for the look. respect. ✨
  • bdspace β€” sets the space between the border and the body of the box, in pixels. default is 4 pixel. personal space matters bestie 🫢
  • bdwidth β€” sets the border width in pixels. default is 1 pixel.
  • width β€” sets the total table width in pixels. default is no specific width for the standard box and 300 pixels for the headlined box β€” and the reason is that the headlined variant needs to know a fixed size to create the GIFs accordingly. it just has to know. it's a fixed-size girlie. 😭
  • summary β€” adds a description of this table. this attribute is recommended in HTML 4.0. accessibility queen behavior, we love to see it. πŸ‘‘

🌈 EXAMPLE 🌈

here's both variants doing their thing, side by side, exactly as written:

<box bdcolor="#000000" bdwidth=1 bdspace=10
     bgcolor="#ffffff" fgcolor="#000000">
Foo Bar Quux
</box>

<box header="Foo Bar Quux Header"
     bdcolor="#000000" bdwidth=1 bdspace=10
     bgcolor="#ffffff" fgcolor="#000000">
Foo Bar Quux
</box>

first one: standard box, no header, nested-table build. second one: same colors and spacing but WITH header, so it's the headlined variant. same body text Foo Bar Quux in both, different construction entirely. the way that one attribute changes everything… πŸ˜­πŸ’–


πŸŽ€ AUTHOR πŸŽ€

shoutout to the legend who made this:

Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com

⭐ REQUIRES ⭐

  • Internal: P1, P2

🧚 SEE ALSO 🧚

the HTML <table> tag. that's the whole family tree. that's where all the magic lives. iykyk.


heads up bestie: this is a wml (EN Tools) page, so the #use and the <box> tags are meant for WML processing, not plain raw HTML you just yeet into a browser. πŸ’…

and that's the page!! wml::std::box(3), EN Tools, dated 2020-11-29 β€” ty for coming to my TED talk, go make some rectangular boxes, mwah πŸ«ΆπŸ’–πŸŒΈ

πŸ“¦ where this page comes from