PageRenderTime 123ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir-R-ref.html

https://github.com/chromium/chromium
HTML | 57 lines | 57 code | 0 blank | 0 comment | 0 complexity | d46f89b30af7615d9826770f8a1d4257 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, Apache-2.0, BSD-3-Clause
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>HTML Test: dir=auto, start with dir, then R</title>
  6. <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
  7. <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
  8. <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
  9. <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" />
  10. <meta name="assert" content="
  11. When dir='auto', the direction is set according to the first strong character
  12. of the text while ignoring contained elements with an explicit dir of their own.
  13. In this test, it is the Hebrew letter Alef, thus the direction must be
  14. resolved as RTL." />
  15. <style>
  16. input, textarea {
  17. font-size:1em;
  18. }
  19. body {
  20. font-size:2em;
  21. }
  22. .test, .ref {
  23. border: medium solid gray;
  24. width: 400px;
  25. margin: 20px;
  26. }
  27. .comments {
  28. display: none;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
  34. <div class="comments">
  35. Key to entities used below:
  36. &#x05D0; - The Hebrew letter Alef (strongly RTL).
  37. &#x05D1; - The Hebrew letter Bet (strongly RTL).
  38. &#x05D2; - The Hebrew letter Gimel (strongly RTL).
  39. </div>
  40. <div class="test">
  41. <div dir="ltr">
  42. <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  43. </div>
  44. <div dir="rtl">
  45. <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  46. </div>
  47. </div>
  48. <div class="ref">
  49. <div dir="ltr">
  50. <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  51. </div>
  52. <div dir="rtl">
  53. <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  54. </div>
  55. </div>
  56. </body>
  57. </html>