Re: [PATCH 7/8] gitweb: Use different colors to present marked changes
- From
Michal Kiedrowicz <michal.kiedrowicz@gmail.com>
- Date
- Feb 13, 2012, 06:46 UTC
- Message-ID
- <20120213074609.2222bd6a@mkiedrowicz.ivo.pl>
- In-Reply-To
- <m3pqdksyg1.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> wrote:
Show 15 quoted lines
> Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes: > > > This makes use of the highlight diff feature. > > > > Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> > > --- > > I decided to split mechanism (generate HTML page with <span> > > elements that mark interesting fragments of diff output) from > > politics (use these particular colors for this <span> elements), > > but otherwise this commit may be squashed with the previous one. > > These colors work for me but if someone comes out with better ones, > > I'd be happy. > > I think it would be better squashed with previous patch, otherwise it > is a bit not visible change...
OK, but please note that since previous patch HTML contains <span> elements around differing segments of diff so the change exists. It just isn't reflected by CSS.
Show 33 quoted lines
>
> > gitweb/static/gitweb.css | 8 ++++++++
> > 1 files changed, 8 insertions(+), 0 deletions(-)
> >
> > diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> > index c7827e8..4f87d16 100644
> > --- a/gitweb/static/gitweb.css
> > +++ b/gitweb/static/gitweb.css
> > @@ -438,6 +438,10 @@ div.diff.add {
> > color: #008800;
> > }
> >
> > +div.diff.add span.marked {
> > + background-color: #77ff77;
> > +}
> > +
> > div.diff.from_file a.path,
> > div.diff.from_file {
> > color: #aa0000;
> > @@ -447,6 +451,10 @@ div.diff.rem {
> > color: #cc0000;
> > }
> >
> > +div.diff.rem span.marked {
> > + background-color: #ff7777;
> > +}
> > +
> > div.diff.chunk_header a,
> > div.diff.chunk_header {
> > color: #990099;
> > --
>
> I'd have to see those colors in use. Then why don't you try it?
> BTW what colors other > highlighting diff GUIs use? >
AFAIK they just use darker red/green background than for the rest of line.