Changes between Version 26 and Version 27 of ColorMacro


Ignore:
Timestamp:
May 16, 2015, 7:45:31 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • ColorMacro

    v26 v27  
    55== Description
    66
    7 ColorMacro is a simple macro that allows you to change the background color of a piece of text. Useful for highlighting, or RAG (red, amber, green) status reports.
     7This is a simple macro that allows you to change the background color of a piece of text. Useful for highlighting, or RAG (red, amber, green) status reports.
    88
    99Usage:
     
    1111[[Color( background-color, color , text )]]
    1212}}}
    13 or
     13or:
    1414{{{
    1515[[Color( color , text )]]
    1616}}}
    1717
    18 Where '''color''' is a color keyword or hex color number recognised by your browser and '''text''' is your text.  Commas are allowed, but '(' and ')' cause a problem.   
     18Where '''color''' is a color keyword or hex color number recognised by your browser and '''text''' is your text. Commas are allowed, but '(' and ')' cause a problem.   
    1919
    20 '''Note''': This could also be archieved out-of-the-box in Trac (>=0.11.8 or so) by span macro (see [http://trac.edgewall.org/wiki/WikiHtml#HowtoUseDivSpan WikiHtml] for Details). Example usage of span macro:
     20'''Note''': This could also be achieved out-of-the-box in Trac (>=0.11.8) by span macro, see [http://trac.edgewall.org/wiki/WikiHtml#HowtoUseDivSpan WikiHtml] for details. Example usage of span macro:
    2121{{{
    2222[[span(''WORLD'', style=color: green)]]
     
    3030If you have any issues, create a
    3131[http://trac-hacks.org/newticket?component=ColorMacro&owner=diroussel new ticket].
     32
     33[[TicketQuery(component=ColorMacro&group=type,format=progress)]]
    3234
    3335== Download
     
    4345Example:
    4446{{{
    45   [[Color(red,This has a red background)]]
    46   [[Color(blue, green,This has a blue background and green text)]]
    47   [[Color(none,#bb0000,I'm using a hex color)]]
     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)]]
    4850}}}
    4951
    5052which would then render as:
    51 {{{
    52 #!html
     53{{{#!html
    5354<span style="background-color:red;padding: 0.1ex 0.4em;">This has a red background</span>
    5455}}}
    5556[[BR]]
    56 {{{
    57 #!html
    58 <span style="background-color:blue;color:green;padding: 0.1ex 0.4em;">This has a blue background and green text</span>
     57{{{#!html
     58<span style="background-color:lightblue;color:green;padding: 0.1ex 0.4em;">This has a lightblue background and green text</span>
    5959}}}
    6060[[BR]]
    61 {{{
    62 #!html
    63 <span style="color:#bb0000;padding: 0.1ex 0.4em;">I'm using a hex color</span>
    64 }}}
    65 [[BR]]
     61{{{#!html
     62<span style="color:#0000bb;padding: 0.1ex 0.4em;">I'm using a hex color</span>
     63}}}
    6664
    6765== Recent Changes