git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitweb.css

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 8, 2010, 16:07 UTC
Message-ID
<m3y6dmklg0.fsf@localhost.localdomain>
In-Reply-To
<19509.15171.909921.769184@winooski.ccs.neu.edu>
Eli Barzilay <eli@barzilay.org> writes:
Show 9 quoted lines
> I've been customizing a gitweb server to fit with the rest of our
> project pages (the result is http://git.racket-lang.org/).  This was
> relatively easy to do except for a few places where gitweb.css
> specifies formatting for generic tags like `body', `table', and `td',
> which messed up our header.
> 
> Maybe it makes sense to localize these styles to to gitweb specific
> classes?  (I know that I can just use my own css, but the file is big
> enough that I prefer avoiding manually merging in updates.)

Can't you just override gitweb's CSS by your own CSS? Later CSS wins. You can have more than one stylesheet in gitweb (@stylesheets).

We could give class to `body' element, and the use it for other class-less selectors (`'table', `'td', `a'), but I don't know if this solution would be enought for you. It means replacing 'body' selector by e.g. '.gitweb_body' selector, and e.g. 'a' selector by '.gitweb_body a' selector.

I'd rather not add 'gitweb' class (or similar) to every element just to have common style for all links, tables, table header cells, table cells.

P.S. while changing static/gitweb.css we could optimize it by removing unnecessary parts of selector. Contrary to what I thought more detailed selector decreases rather than improves performance.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Eli BarzilayNext: Eli Barzilay
Message 2 of 7 in “gitweb.css”
  1. Eli BarzilayJul 8, 2010
  2. Jakub NarebskiJul 8, 2010
  3. Eli BarzilayJul 8, 2010
  4. Jakub NarebskiJul 8, 2010
  5. Eli BarzilayJul 8, 2010
  6. Jakub NarebskiJul 8, 2010
  7. Eli BarzilayJul 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.