opacity.rml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <rml>
  2. <head>
  3. <title>Opacity</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <link rel="Issue #270" href="https://github.com/mikke89/RmlUi/issues/270" />
  6. <meta name="Description" content="Opacity should also apply to font effects." />
  7. <style>
  8. h1 {
  9. margin-top: 2em;
  10. font-size: 1.1em;
  11. }
  12. p {
  13. margin-left: 2em;
  14. }
  15. .red {
  16. color: #f00;
  17. }
  18. .translucent {
  19. opacity: 0.25;
  20. }
  21. .invisible {
  22. opacity: 0.0;
  23. }
  24. .font_effect {
  25. font-effect: outline(2px #f00);
  26. color: #ff0;
  27. }
  28. .red.alpha {
  29. color: #f004;
  30. }
  31. .font_effect.alpha {
  32. font-effect: outline(2px #f004);
  33. color: #ff04;
  34. }
  35. </style>
  36. </head>
  37. <body>
  38. <h1>Reference.</h1>
  39. <p class="red">This is some text.</p>
  40. <p class="font_effect">This is some text.</p>
  41. <h1>Translucent.</h1>
  42. <p class="red translucent">This is some text.</p>
  43. <p class="font_effect translucent">This is some text.</p>
  44. <h1>Invisible, there should be no red text below.</h1>
  45. <p class="red invisible">This is some text.</p>
  46. <p class="font_effect invisible">This is some text.</p>
  47. <h1>Color with alpha channel.</h1>
  48. <p class="red alpha">This is some text.</p>
  49. <p class="font_effect alpha">This is some text.</p>
  50. <h1>Color with alpha channel and translucency.</h1>
  51. <p class="red alpha translucent">This is some text.</p>
  52. <p class="font_effect alpha translucent">This is some text.</p>
  53. </body>
  54. </rml>