20 | | '''Note''': This could also be achieved out-of-the-box in Trac (>=0.11.8) by span macro, see [t:WikiHtml#HowtoUseDivSpan WikiHtml] for details. Example usage of span macro: |
| 20 | Example: |
| 21 | {{{ |
| 22 | [[Color(red, This has a red background)]] |
| 23 | [[Color(lightblue, green, This has a lightblue background and green text)]] |
| 24 | [[Color(none, #0000bb, I'm using a hex color)]] |
| 25 | }}} |
| 26 | |
| 27 | which would then render as: |
| 28 | {{{#!html |
| 29 | <span style="background-color:red;padding: 0.1ex 0.4em;">This has a red background</span> |
| 30 | }}} |
| 31 | [[BR]] |
| 32 | {{{#!html |
| 33 | <span style="background-color:lightblue;color:green;padding: 0.1ex 0.4em;">This has a lightblue background and green text</span> |
| 34 | }}} |
| 35 | [[BR]] |
| 36 | {{{#!html |
| 37 | <span style="color:#0000bb;padding: 0.1ex 0.4em;">I'm using a hex color</span> |
| 38 | }}} |
| 39 | |
| 40 | '''Note''': The effect of this macro could also be achieved out-of-the-box in Trac (>= 0.11.8) by span macro, see [t:WikiHtml#HowtoUseDivSpan WikiHtml] for details. Example usage of span macro: |
43 | | == Example |
44 | | |
45 | | Example: |
46 | | {{{ |
47 | | [[Color(red, This has a red background)]] |
48 | | [[Color(lightblue, green, This has a lightblue background and green text)]] |
49 | | [[Color(none, #0000bb, I'm using a hex color)]] |
50 | | }}} |
51 | | |
52 | | which would then render as: |
53 | | {{{#!html |
54 | | <span style="background-color:red;padding: 0.1ex 0.4em;">This has a red background</span> |
55 | | }}} |
56 | | [[BR]] |
57 | | {{{#!html |
58 | | <span style="background-color:lightblue;color:green;padding: 0.1ex 0.4em;">This has a lightblue background and green text</span> |
59 | | }}} |
60 | | [[BR]] |
61 | | {{{#!html |
62 | | <span style="color:#0000bb;padding: 0.1ex 0.4em;">I'm using a hex color</span> |
63 | | }}} |
64 | | |