Whakerexa > Extras > Poster

Poster

poster.css lays out one page of a fixed size, printed whole: a conference poster. It is not print.css, which cuts a normal document into paper pages, and it is not slides.css, which follows the viewport. Here the page has one size, decided by the author, and everything is placed inside it. The stylesheet asks for no JavaScript. A poster read on a screen before it is printed can be given the accessibility controls, which are the one thing here that needs any (below).

The default canvas is A0 portrait, 841 by 1189 millimetres. It is not a list of formats to pick from: the export being vector PDF, a poster laid out at A0 is printed at A1, A2 or A3 from the print dialog alone, with nothing to change in the page.

Loading order

After wexa.css, and after layout.css if the card and panel utilities are wanted — the file builds on both, and after menu.css if the accessibility controls are wanted, the buttons of the bar being sized by it. Before a theme and before the page's own stylesheet, which have the last word.

<link rel="stylesheet" href="wexa_statics/css/wexa.css">
<link rel="stylesheet" href="wexa_statics/css/layout.css">
<link rel="stylesheet" href="wexa_statics/css/menu.css">
<link rel="stylesheet" href="wexa_statics/css/extras/poster.css">
<link rel="stylesheet" href="your_theme.css">
<link rel="stylesheet" href="your_poster_page.css">

A theme is loaded as a plain <link>: what is printed is decided before printing, and the poster on the wall does not change. A poster that is also read on a screen — checked before printing, put online beside the paper one — is loaded through wexa.loader.js instead, and then the theme is one of the three things its reader can change.

What it looks like

The stylesheet does not add to a page: it replaces it. The canvas is the body itself, so a poster is a document of its own — this page cannot be its own example, and shows one instead: poster-demo.html.

Open it, then print it: what you see is what comes out, at the size @page is given.

HTML structure

The canvas is the body itself. Its three bands are the page's own header, main and footer; nothing else is required.

<body class="poster-canvas">

    <header> … title, authors, logos … </header>

    <main class="grid-panel poster-columns">
        <div class="grid-item">
            <section class="card">
                <h2 class="card-header">A title</h2>
                …
            </section>
        </div>
        <div class="grid-item"> … </div>
    </main>

    <footer> … references, funding … </footer>

</body>

What the file provides

Classes
ClassOnWhat it does
poster-canvas body The page itself: one fixed-size ground, its three bands stacked and centred in it, the leftover height split above the first and below the last. Required.
poster-columns main, with grid-panel Columns of equal height: each one reaches the full height of the row, and its own slack falls between its cards, so every column starts on one horizon and ends on another.
poster-ribbon A heading A title band with no card under it — a heading that groups several cards. Same look as card-header.
poster-note aside A footnote line under a block. Undoes the floated side-note wexa.css makes of every aside.
poster-table-note p The line of units or conventions under a table, smaller again.

Cards come from layout.css unchanged — card, card-header, card-body, card-footer — resized here for a full-width print column. Figures and their captions are plain figure and figcaption, restyled inside the canvas.

Variables

Every measurement the file draws with is declared once and read by the rules. A poster is tuned by redefining these in its own stylesheet, never by overriding a rule of poster.css.

Measurements of the canvas
VariableDefaultWhat it sets
--poster-width841mmWidth of the page. Set both for any other format, landscape included.
--poster-height1189mmHeight of the page.
--poster-padding8mm 22mm 5mmMargins of the canvas: top, inline, bottom.
--poster-header-gap10mmBetween the header and main.
--poster-footer-gap10mmBetween main and the footer. Apart from the one above: a header of title, authors and logos does not call for the same air under it as a footer of references calls for above it.
--poster-card-gap10mmBetween two cards, and under a ribbon.
--poster-card-padding7mmGround of a card. Feeds --card-padding, which layout.css uses for the card's padding and for the bleed of its title band, so one number keeps the two in step.
--poster-card-header-gap5mmUnder a title band. Without it a table or a figure sits flush against it, neither carrying a margin of its own.
--poster-figure-gap3mmAbove and below a figure.
--poster-caption-gap1.5mmBetween a block and the caption or note under it.
--poster-border-radius5mmCorners. Feeds --border-radius and --card-border-radius, both stated in px elsewhere and invisible at this size.
Type scale, as ratios of --font-size
VariableDefaultWhat it sizes
--poster-title-scale1.18A card title and a ribbon.
--poster-caption-scale0.78A figure caption.
--poster-note-scale0.74A poster-note.
--poster-table-note-scale0.65A poster-table-note.

The file also restates four variables of Whakerexa itself, as print.css does for the same reason — the framework's own defaults are read against a screen or an A4 page: --font-size (28pt), the two --typography-spacing-*, and --size-divisor, pinned to 1 so headings scale from the type alone and not from the width of a viewport.

A poster in another format sets its own --font-size: the canvas changes size, the type does not follow it on its own.

Tuning a poster

/* your_poster_page.css */
:root {
    --poster-width:  594mm;   /* A1 portrait */
    --poster-height: 841mm;
    --font-size:     20pt;

    --poster-header-gap: 14mm;
    --poster-card-gap: 14mm;
}

Accessibility controls

A poster is drawn for a wall, at one size, in one set of colors. Read on a screen instead, it is read by someone who may need another theme, the contrast mode, or the dark mode — and a poster that cannot be changed leaves them with nothing.

poster.js builds the bar the presentations use, out of sight, and the a key brings it in and out. Nothing of the poster moves when it appears: the bar is fixed to the window, above the page. It is a nav.nav-wexa, which print.css hides, so a page that loads print.css does not print it.

<script>
    window.bootPage = function (wexa) {
        const poster = new wexa.Poster();
        poster.init();
    };
</script>

<script src="wexa_statics/js/wexa.loader.js"
        data-base="wexa_statics/"
        data-extras="js/extras/poster.js"></script>

The three buttons are carried unless they are turned off, one by one. A poster whose colors are the ones its author chose, and are not to be traded for another theme, says so:

const poster = new wexa.Poster({theme: false, contrast: true, color: true});
What each of the three is for
Asked forThe buttonWhat it changes
themeTheme The next theme of those the page declared.
contrastContrast The contrast mode, on and off.
colorMode The light mode and the dark mode.

show(), hide() and toggle() do from the page what the key does; destroy() gives the key back to the browser. A page that already carries a bar under the name accessibility-controls keeps its own: nothing is built over it.

Printing

The file carries an @page rule of the canvas's size, with no margin. Chromium honours it when printing or exporting to PDF. Firefox ignores @page entirely — the same limitation already noted in print.css. Printing from Firefox means picking the paper size by hand in the print dialog, to match --poster-width and --poster-height; exporting from a Chromium-based browser avoids the step.

If the content is taller than the canvas, the page overflows onto a second printed sheet rather than shrinking to fit. This is deliberate: the bands cannot be squeezed into each other, so an overflow is seen instead of being silently absorbed.

Colors

None are written in this file. Cards, ribbons and the page ground read --header-bg-color, --header-fg-color, --bg-color, --bg-color-alt and the --border-* variables, so the loaded theme decides the palette — see CSS variables.