Imagina RPG Docs
Help

Styling your world page with HTML

The styled description panel is a block of your own HTML and CSS, shown in a box under the world's description on its page. It is open to verified creators: if the field is missing from your editor, your account does not have it.

The styled description panel is a block of your own HTML and CSS, shown in a box under the world's description on its page. It is open to verified creators: if the field is missing from your editor, your account does not have it.

The panel is decoration. Your Markdown description stays the real one: it is what gets translated, searched, shown on world cards and read by screen readers. Never put anything a player needs only in the panel. The panel itself is not translated, so write it in the world's own language.

Where to write it

  • The studio. On desktop, Open the studio under Styled panel in World info opens a full-screen editor: a code editor on the left, the live panel on the right at phone, tablet and desktop widths, a tray of your world's pictures, and starter templates.
  • Style with Ima. The studio can write a panel for you from the world's description, cast and pictures, or restyle the current one from a short request ("noir case file, more red").
  • An AI assistant. Through the Imagina MCP server, an assistant writes it as the descriptionHtml field of a draft with update_world. Its get_authoring_guide tool carries the short reference, and this page is the long one.

The panel is saved with the draft and goes live when you publish, like any other field. To remove it, empty the field.

What you can write

One HTML fragment, up to 60,000 characters, with <style> blocks and style attributes.

Tags: sections and text (div, span, section, article, aside, header, footer, h1 to h6, p, blockquote, q, cite, small, strong, em, mark, code, pre, time...), lists, tables, figure and figcaption, details and summary, img, label, links, and input as a radio button or checkbox only.

Attributes: class, id, style, src, alt, href, title, width, height, for, name, type, checked, open, colspan, rowspan, datetime, lang, dir, aria-label, aria-hidden, and data-no-zoom.

Removed: scripts and event handlers (onclick and the like), iframes, forms, buttons, dialogs and popovers, inline <svg> elements, and links to most other sites. Links may point to a world (/w/<code>), an author's profile (/u/<name>), YouTube or SoundCloud, and open in a new tab.

CSS: almost everything works, including grid, flexbox, @media, @supports, @container and @keyframes. Removed: @import, @font-face, position: fixed and sticky, image-set(), attr(), and any url() that is not one of your pictures. Blur is removed from filter and backdrop-filter is dropped, as they are too slow on phones.

The editor lists everything it removed, underlined at its first spot in the code, so check that list before you publish.

Pictures

A panel can only show pictures the world already has, in src or in a CSS url():

WriteShows
asset:coverThe title card
asset:backgroundThe play background
asset:showcaseThe showcase image
asset:cast/sloaneA playable character's or NPC's portrait, by first name or full name (asset:cast/sloane-ashby)
extra:Winter FormalAn Extra Image, by its label
<img src="extra:Winter Formal" alt="The winter formal" />

One panel can use up to 24 pictures. An animated Extra Image plays as its loop, unless the reader has asked for less motion. A picture marked NSFW only shows to readers with NSFW content on.

You can also draw vector pictures inline, as a data:image/svg+xml,... URI made of shapes and SMIL animation, with no text, no pictures and no scripts inside.

Click to zoom

Readers can click a picture in an <img> to open it full size, then browse the panel's other pictures from there. You do not need to add anything for this.

Some pictures stay put:

  • a picture inside a link, a <label> or a <summary>, since clicking it already does something
  • a picture inside an element with aria-hidden="true"
  • vector data: pictures and CSS backgrounds
  • a picture with data-no-zoom, or inside an element that has it

Use data-no-zoom for decoration: dividers, textures, a backdrop under text.

<img src="asset:background" alt="" data-no-zoom />

Anything drawn on top of a picture takes the click instead: a ::after gradient, a caption laid over the bottom. Give that layer pointer-events: none when the picture under it should still open.

.moment figcaption {
  pointer-events: none;
}

Tabs and carousels without scripts

Radio buttons and labels are enough for tabs, carousels and character pickers. Put the radios first, then style what follows with :checked ~.

<div class="cast">
  <input type="radio" name="cast" id="pick-mio" checked />
  <input type="radio" name="cast" id="pick-sloane" />
  <div class="tabs">
    <label for="pick-mio">Mio</label>
    <label for="pick-sloane">Sloane</label>
  </div>
  <figure class="card mio"><img src="asset:cast/mio" alt="Mio" /></figure>
  <figure class="card sloane"><img src="asset:cast/sloane" alt="Sloane" /></figure>
</div>
.cast input {
  position: absolute;
  opacity: 0;
}
.cast .card {
  display: none;
}
#pick-mio:checked ~ .mio,
#pick-sloane:checked ~ .sloane {
  display: block;
}

Clicking a label switches the card, and the picture inside the label does not open the zoom. <details> and <summary> work too, for anything a reader opens on purpose.

NSFW-only passages

For a part of the panel only readers with NSFW content on should get, wrap it in two comments:

<p>Shown to everyone.</p>
<!--nsfw-->
<figure><img src="extra:The morning after" alt="" /></figure>
<!--/nsfw-->

The passage is cut before the page is sent, so other readers never receive it. Keep the comments in the HTML, not inside a <style> block. Passages cannot nest, and a missing closing comment hides everything after the opening one. In the studio, the preview's NSFW switch shows the panel as both kinds of readers see it.

Layout tips

  • Size. The box folds behind Show more past 1,500 pixels and stops at 4,000. Aim for 700 to 1,500 pixels tall.
  • Phones. Size things with a container query on the panel's own width rather than the screen's, and avoid fixed widths a narrow screen cannot fit.
  • Fonts. Inter, IBM Plex Serif, Reforma 1969, Cinzel and Comic Neue are available. Other fonts cannot be loaded.
  • Motion. Keep it quiet and put it behind @media (prefers-reduced-motion: no-preference). Animations pause while the panel is off screen.
  • One composition. A poster, a cast strip and a few moments read better than a second copy of the whole description.
  • Blurred covers. When a world page blurs the cover for a reader, the panel is not shown at all.

On this page