text-align-end-021.html (1346B)
1 <!DOCTYPE html> 2 <html lang="en" > 3 <head> 4 <meta charset="utf-8"> 5 <title>text-align: end, textarea, dir=auto on surrounding block</title> 6 <link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> 7 <link rel='help' href='https://drafts.csswg.org/css-text-3/#text-align-property'> 8 <meta name="assert" content="text-align:end aligns inline-level content to the end edge of the line box – ie. since dir=auto is not inherited by textarea, to right in ltr context."> 9 <style type='text/css'> 10 .test { text-align: end; } 11 /* the CSS below is not part of the test */ 12 .test { border: 1px solid blue; margin: 20px; width: 300px; font-size: 24px; line-height: 1;} 13 </style> 14 </head> 15 <body> 16 <div id='instructions'>Test passes if both words are right-aligned in both boxes.</div> 17 <div dir="auto"> 18 <textarea class="test">latin 19 و·کمی</textarea> 20 </div> 21 <div dir="auto"> 22 <textarea class="test">و·کمی 23 latin</textarea> 24 </div> 25 <!-- 26 Notes: 27 The rationale for the expected outcome here is described at 28 https://drafts.csswg.org/css-writing-modes-3/#valdef-unicode-bidi-plaintext 29 "Because the unicode-bidi property does not inherit, setting bidi-override or plaintext on a block box will not affect any descendant blocks. Therefore these values are best used on blocks and inlines that do not contain any block-level structures. " 30 --> 31 </body> 32 </html>