Re: [css-text] boustrophedon in CSS?

> On Nov 8, 2016, at 08:11, John Hudson <> wrote:
> I'm working on an epichoric Greek font for transcription of archaic and early-classical inscriptions. The primary use of the font will, therefore, involve boustrophedon layout invoked by Unicode BiDi control characters to set RTL layout on alternate lines of transcribed inscription texts, i.e. the control characters will be manually applied by scholars to text with hard line-breaks. The font's <rtla> OpenType Layout feature lookups will be responsible for displaying flipped forms of letters in the RTL lines (presuming cooperation of layout engine support).
> I've been wondering, though, about boustrophedon layout within CSS as something that could be responsive to soft line-breaking, flex boxes, device orientation, etc.. I've looked online, to see if CSS already had boustrophedon-related properties, but have only found examples of people using CSS transforms to flip lines of text, rather than using a mechanism that will access designed RTL glyphs vis OpenType features. At least some of these examples seem also to rely on hard line-breaks, and are not responsive to changes in window width, etc.
> Has any thought been given to defining boustrophedon layout within CSS in a way that would make it responsive and would take advantage of font-level display variants?
> I realise that this is of very limited practical use, and is little more than a gimmick, given that significant use of boustrophedon will be with hard line-breaks in transcriptions of archaic Greek inscriptions.

I don't think boustrophedon for its own sake has any chance of getting supported by CSS. The use case is way too narrow. On the other hand,
the ability to do it may fall out of some other more generic mechanism. For instance, this might end up working one day:

.boustrophedon {
  display: block;
  continue: fragments;
  max-lines: 1;
.boustrophedon::nth-fragment(2n+1) {
  direction: ltr;
.boustrophedon::nth-fragment(2n) {
  direction: rtl;

See css-overflow-4 for the continue and max-lines properties, and the ::nth-fragment pseudo.

Note that this is far from being stable, so it may change radically between now and implementation, or fail to mature altogether, but I think this is the closest we've got to boustrophedon support in upcoming CSS.

 - Florian

Received on Tuesday, 8 November 2016 04:25:41 UTC