braillespecs / braille-css

Braille CSS specification
http://braillespecs.github.io/braille-css
2 stars 1 forks source link

Including and repeating content in specific volumes #23

Closed bertfrees closed 8 years ago

bertfrees commented 9 years ago

Add a section that describes how to include and repeat certain content at the beginning or end of specific volumes, using the "named flow" feature. The section belongs under either Volumes or Out-of-Flow Positioning.

bertfrees commented 9 years ago

Example: to repeat content in each volume, use the flow(..., all) within the @begin rule:

#titlepage {
  flow: preliminary;
}
@volume {
  @begin {
    content: flow(preliminary, all);
  }
}

Elements can not be styled based on in which volume they appear (just like elements can't be styled based on the page type on which they appear). This would cause problems anyway because of the fact that elements can be split across volumes. The solution is to style elements based on their named flow:

@volume {
  @begin {
    content: flow(preliminary, all);
  }
}
@volume:first {
  @begin {
    content: none;
  }
}
toc {
  flow: normal preliminary;
  ...
}
toc:flow(preliminary) {
  ...
}
bertfrees commented 8 years ago

This is now supported in the specification, except that the all keyword is called document, the flow property must be a single <ident>, and there is no :flow(...) pseudo-class. Instead of

toc {
  flow: normal preliminary;
  ...
}
toc:flow(preliminary) {
  ...
}

you would now use:

toc {
  ...
}
toc::duplicate {
  flow: preliminary;
  ...
}

See http://snaekobbi.github.io/braille-css-spec/#h3_named-flows.