letter_spacing.rml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <rml>
  2. <head>
  3. <title>'letter-spacing' property</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <link rel="help" href="https://w3c.github.io/csswg-drafts/css-text/#letter-spacing-property" />
  6. <meta name="Description" content="Test 'letter-spacing' property at different lengths. Negative string widths should not crash the library." />
  7. <style>
  8. body {
  9. font-size: 14px;
  10. padding: 0;
  11. border: 8dp #ddd;
  12. }
  13. h1 {
  14. color: blue;
  15. margin-bottom: 0;
  16. }
  17. hr { margin: 1em 0; }
  18. p { margin-top: 0; }
  19. .color { color: #a33; }
  20. .normal { letter-spacing: normal; color: green; }
  21. </style>
  22. </head>
  23. <body>
  24. <h1>normal</h1> <p style="letter-spacing: normal">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  25. <h1>1px</h1> <p style="letter-spacing: 1px">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  26. <h1>-1px</h1> <p style="letter-spacing: -1px">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  27. <h1>5x</h1> <p style="letter-spacing: 5px">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  28. <h1>0.4em (5.6px)</h1> <p style="letter-spacing: 0.4em">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  29. <h1>-5px</h1> <p style="letter-spacing: -5px">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  30. <h1>20px</h1> <p style="letter-spacing: 20px">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  31. <h1>-20px</h1> <p style="letter-spacing: -20px">In consectetur, neque <span class="normal">dignissim tincidunt</span> dapibus, leo <span class="color">metus molestie</span> erat.</p>
  32. <hr/>
  33. <h1>20px (left-aligned)</h1> <p style="letter-spacing: 20px; text-align: left; ">abc</p>
  34. <h1>20px (centered)</h1> <p style="letter-spacing: 20px; text-align: center;">abc</p>
  35. <h1>20px (right-aligned)</h1> <p style="letter-spacing: 20px; text-align: right; ">abc</p>
  36. <hr/>
  37. <h1>letter-spacing on inner element</h1> <p style="letter-spacing: 0.5em;">a<span style="letter-spacing: 2em; background: #eee">bb</span>c</p>
  38. <handle size_target="#document"/>
  39. </body>
  40. </rml>