Abstract

This module builds on braille CSS [BRAILLECSS] and defines a set of properties, values and pseudo-elements specific to OBFL based [OBFL] agents.

Status of This Document

This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.

The features defined in this document are intended to be temporary solutions. The goal is to define official braille CSS features that can be made to work the same across all agents. In order to make the distinction clear, all properties, values and pseudo-elements defined here have an ‘-obfl-’ prefix.

Table of Contents

1. Vertical Positioning: the -obfl-vertical-positioning and -obfl-vertical-align properties

Name: -obfl-vertical-positioning
Value: <length> | auto
Initial: auto
Applies to: block | list-item
Inherited: no
Media: embossed
Computed value: specified value
Name: -obfl-vertical-align
Value: before | center | after
Initial: after
Applies to: block | list-item
Inherited: no
Media: embossed
Computed value: specified value

These properties map directly to the block attributes vertical-position and vertical-align in OBFL. Lengths must be non-negative.

2. Underlining blocks of text: the -obfl-underline property

Name: -obfl-underline
Value: <braille-character> | none
Initial: none
Applies to: block | list-item
Inherited: no
Media: embossed
Computed value: specified value

This property maps to a combination of OBFL block attributes underline-style, underline-align and underline-width.

3. Evaluating OBFL expressions: the -obfl-evaluate() function

This module extends the content property with the -obfl-evaluate() function, which evaluates an “OBFL Evaluation Language” [OBFLEVAL] expression. -obfl-evaluate() is added to the list of possible values in the definition of <content-list>.

-obfl-evaluate() = -obfl-evaluate( <string> )

The string argument must be a valid OBFL Evaluation Language expression. In addition, the variables used in the expression must be available in the context of the element on which the content property with the -obfl-evaluate() value is specified. Available variables are:

volume
The current volume number. Available in the context of @begin and @end areas. (That means, the element on which the content property is specified must be flowed into a @begin or @end area. See the chapter about Named flows.)
volumes
The total number of volumes. Available in the context of @begin and @end areas.
sheets-in-volume
The number of sheets contained in the current volume. Available in the context of @begin and @end areas.
sheets-in-document
The number of sheets contained in the whole document. Available in the context of @begin and @end areas.
volume-started-number
The volume number of the current volume section in a table of contents or list of references. Available in the context of ::-obfl-on-volume-start and ::-obfl-on-volume-end pseudo-elements.

4. Tables of Contents

4.1 Extending the display property with -obfl-toc

Braille CSS [BRAILLECSS] defines the display property with possible values block, inline, list-item, and none. This module extends the possible values with -obfl-toc.

The -obfl-toc value corresponds in OBFL with a toc-sequence element that is backed by a table-of-contents element. The content of the table-of-contents element in OBFL corresponds with the content of the -obfl-toc element in CSS. The -obfl-toc value only applies to elements that are placed into a volume area through the mechanism of named flows.

-obfl-table-of-contents may be used as an alias for -obfl-toc.

4.2 The -obfl-toc-range property

Name: -obfl-toc-range
Value: document | volume
Initial: document
Applies to: -obfl-toc
Inherited: no
Media: embossed
Computed value: specified value

This property maps directly to the range attribute of the toc-sequence element in OBFL.

4.3 The ::-obfl-on-toc-start, ::-obfl-on-volume-start, ::-obfl-on-volume-end and ::-obfl-on-toc-end pseudo-elements

The ::-obfl-on-toc-start, ::-obfl-on-volume-start, ::-obfl-on-volume-end and ::-obfl-on-toc-end pseudo-elements correspond directly with the on-toc-start, on-volume-start, on-volume-end and on-toc-end elements in OBFL. These pseudo-elements apply to elements with a display value of -obfl-toc. They are generated if and only if the computed value of their content property is not none and does not consist of collapsible white space only. In addition, the ::-obfl-on-volume-start and ::-obfl-on-volume-end pseudo-elements also apply to elements with a display value of -obfl-list-of-references (see below).

5. Lists of References

A list of references (typically a list of notes at the beginning or end of a chapter, volume or document) may be generated using the flow property and the flow() function, as explained in the section Endnotes. This section provides an alternative way to generate a list of references, only at the beginning or end of the document, but with support for sorting references per volume.

5.1 Extending the display property with -obfl-list-of-references

Braille CSS [BRAILLECSS] defines the display property with possible values block, inline, list-item, and none. This module extends the possible values with -obfl-list-of-references.

The -obfl-list-of-references value corresponds with the list-of-references element in OBFL. The collection from which the items are taken is determined by the element's content property, which must consist of exactly one -obfl-collection() value. The range is always document.

The -obfl-list-of-references value only applies to ::alternate pseudo-elements that are placed into a volume area through the mechanism of named flows.

Elements with a display value of -obfl-list-of-references support the ::-obfl-on-volume-start and ::-obfl-on-volume-end pseudo-elements.

5.2 The -obfl-collection() function

The -obfl-collection() function has exactly the same meaning as the flow() function, except that it doesn't accept an optional second argument. The range is therefore always document.

-obfl-collection() = -obfl-collection( <custom-ident> )

Unlike the flow() function, the -obfl-collection() function is allowed in an element that participates in a named flow itself. On the other hand, it is also much more limited in use than flow(), since it is only allowed within elements with a display value of -obfl-list-of-references.

6. Table Cell Spacing: the -obfl-table-col-spacing, -obfl-table-row-spacing and -obfl-preferred-empty-space properties

Name: -obfl-table-col-spacing
Value: <length>
Initial: 0
Applies to: table
Inherited: no
Media: embossed
Computed value: specified value
Name: -obfl-table-row-spacing
Value: <length>
Initial: 0
Applies to: table
Inherited: no
Media: embossed
Computed value: specified value
Name: -obfl-preferred-empty-space
Value: <length>
Initial: 2
Applies to: table
Inherited: no
Media: embossed
Computed value: specified value

These properties map directly to the table-col-spacing, table-row-spacing and preferred-empty-space attributes of the table element in OBFL. Lengths must be non-negative.

7. Volume Breaking

7.1 Extending the volume-break-inside property with -obfl-keep()

A volume-break-inside property with a -obfl-keep() value maps to the OBFL block attribute volume-keep-priority.

-obfl-keep() = -obfl-keep( <integer> )

The function argument defines the priority. It must be an <integer> between 1 and 9.

7.2 The -obfl-keep-with-previous-sheets and -obfl-keep-with-next-sheets properties

Name: -obfl-keep-with-previous-sheets
Value: <integer>
Initial: 0
Applies to: block | list-item | table
Inherited: no
Media: embossed
Computed value: specified value
Name: -obfl-keep-with-next-sheets
Value: <integer>
Initial: 0
Applies to: block | list-item | table
Inherited: no
Media: embossed
Computed value: specified value

These properties map directly to the block attributes keep-with-previous-sheets and keep-with-next-sheets in OBFL. Values must be non-negative.

8. Conditional rendering based on the existence of collections: the -obfl-use-when-collection-not-empty property

Name: -obfl-use-when-collection-not-empty
Value: <custom-ident> | normal
Initial: normal
Applies to: all elements
Inherited: no
Media: embossed
Computed value: the specified value

If the value identifies a named flow through which content has passed, the element behaves normally, otherwise it generates no boxes (as if the display property were set to none).

A. References

A.1 Informative references

[BRAILLECSS]
Bert Frees. Braille CSS. Unofficial Draft. URL: http://braillespecs.github.io/braille-css/master
[OBFL]
Joel Håkansson. OBFL - Open Braille Formatting Language. Unofficial Draft. URL: http://braillespecs.github.io/obfl/obfl-specification.html
[OBFLEVAL]
Joel Håkansson. OBFL Evaluation Language. Unofficial Draft. URL: http://braillespecs.github.io/obfl/obfl-evaluation-language.html