Export (0) Print
Expand All
Expand Minimize

2.1.83 [CSS-Level2-2009] Section 16.6.2, Example of bidirectionality with white space collapsing

V0499:

The specification states:

Given the following markup fragment, taking special note of spaces (with varied backgrounds and borders for emphasis and identification):

 
     <ltr>A <rtl> B </rtl> C</ltr>

...where the <ltr> element represents a left-to-right embedding and the <rtl> element represents a right-to-left embedding, and assuming that the 'white-space' property is set to 'normal', the above processing model would result in the following:
The space before the B ( ) would collapse with the space after the A ( ).
The space before the C ( ) would collapse with the space after the B ( ).
This would leave two spaces, one after the A in the left-to-right embedding level, and one after the B in the right-to-left embedding level. This is then rendered according to the Unicode bidirectional algorithm, with the end result being:

     A  BC

All Document Modes (All Versions)

The Unicode 'RIGHT-TO-LEFT-OVERRIDE' (U+202E) character changes the position of surrounding white space, thus affecting white-space collapsing.

Show:
© 2015 Microsoft