In this lesson, you gave The Lantern Press an issue banner like the spine of the printed zine, then turned its text on its side with writing-mode. Here are the main points and the banner’s final code.
Key Points
inline-sizeandblock-sizesize a box along the text. In horizontal text,inline-sizeis the width andblock-sizeis the height, so the banner starts out 256 pixels wide and 48 pixels tall.writing-modesets which way lines run. The default,horizontal-tb, runs lines across and stacks them from top to bottom.vertical-rlruns each line from top to bottom and stacks the lines from right to left.- In
vertical-rl, the inline start is the top, so the banner’sborder-inline-startandpadding-inline-startmove to its top edge. The block start is the right, so the words sit against the banner’s right edge. - Watch out:
inline-sizeis the width only in horizontal text. In vertical text, it’s the height, so the banner becomes 256 pixels tall and 48 pixels wide. - For this left-to-right banner, going from horizontal to
vertical-rlmoves each edge name a quarter turn clockwise: inline start from the left to the top, block start from the top to the right, inline end to the bottom, and block end to the left. Withdir="rtl", inline start moves to the bottom instead and inline end to the top, whilevertical-rlstill stacks the lines from right to left. - The quarter turn is only a way to remember the map. A picture turned on its side would keep its old 256-by-48 spot and hang over the content below. The browser lays the text out instead, so the banner takes up 48 by 256 pixels and the In This Issue heading moves down 208 pixels to clear it.
- Inline means along a line of text and block means across the lines. Logical properties follow those axes, whichever way the writing mode turns them.
The Final Code
The banner’s HTML, at the top of <main> in index.html: