Changeset 832 for trunk/lib


Ignore:
Timestamp:
Oct 30, 2009, 1:58:52 PM (12 years ago)
Author:
Peter Johansson
Message:

use variable rather than hard-code string in multiple places.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/css.cc

    r831 r832  
    195195    s << "table.blame tbody td.date {text-align:right;padding-right:1.45em;}\n";
    196196    s << "table.blame tbody td.rev { text-align: right; }\n";
     197    std::string bg_lt_code("cfcfff");
     198    std::string bg_lt_comment("e8e8ff");
     199    std::string bg_lt_other("ffffff");
    197200    s << "table.blame tbody td.line-code { text-align: right; "
    198       << "background: #cfcfff; }\n";
     201      << "background: #" << bg_lt_code << "; }\n";
    199202    s << "table.blame tbody td.line-comment { text-align: right; "
    200       << "background: #e8e8ff; }\n";
     203      << "background: #" << bg_lt_comment << "; }\n";
    201204    s << "table.blame tbody td.line-other { text-align: right; "
    202       << "background: #ffffff; }\n";
     205      << "background: #" << bg_lt_other << "; }\n";
    203206    s << "table.blame tbody tr:hover { background: #eed; }\n";
    204207    s << "table.blame tbody td a { display: block; }\n";
     
    245248
    246249    s << ".sep { color: #666}\n";
    247     s << "div.blame_legend .code { background: #cfcfff; }\n"
    248       << "div.blame_legend .comment { background: #e8e8ff; }\n"
    249       << "div.blame_legend .other { background: #ffffff; }\n"
     250    s << "div.blame_legend .code { background: #" << bg_lt_code << "; }\n"
     251      << "div.blame_legend .comment { background: #" << bg_lt_comment << "; }\n"
     252      << "div.blame_legend .other { background: #" << bg_lt_other << "; }\n"
    250253      << "div.blame_legend {\n"
    251254      << "float: left;\n"
Note: See TracChangeset for help on using the changeset viewer.