{"thread":{"id":"24332","subject":"gitweb.css","startedAt":"2010-07-08T02:43:15Z","lastAt":"2010-07-08T19:30:39Z","messageCount":7,"participants":["Eli Barzilay","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"145079","messageId":"19509.15171.909921.769184@winooski.ccs.neu.edu","threadId":"24332","inReplyTo":null,"subject":"gitweb.css","fromName":"Eli Barzilay","fromEmail":"eli@barzilay.org","sentAt":"2010-07-08T02:43:15Z","receivedAt":"2010-07-08T02:43:15Z","isPatch":false,"sender":{"key":"eli@barzilay.org","avatar":"https://avatars.githubusercontent.com/u/185905?v=4"},"body":"I've been customizing a gitweb server to fit with the rest of our\nproject pages (the result is http://git.racket-lang.org/).  This was\nrelatively easy to do except for a few places where gitweb.css\nspecifies formatting for generic tags like `body', `table', and `td',\nwhich messed up our header.\n\nMaybe it makes sense to localize these styles to to gitweb specific\nclasses?  (I know that I can just use my own css, but the file is big\nenough that I prefer avoiding manually merging in updates.)\n\n-- \n          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:\n                    http://barzilay.org/                   Maze is Life!\n"},{"id":"145136","messageId":"m3y6dmklg0.fsf@localhost.localdomain","threadId":"24332","inReplyTo":"19509.15171.909921.769184@winooski.ccs.neu.edu","subject":"Re: gitweb.css","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-07-08T16:07:00Z","receivedAt":"2010-07-08T16:07:00Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Eli Barzilay <eli@barzilay.org> writes:\n\n> I've been customizing a gitweb server to fit with the rest of our\n> project pages (the result is http://git.racket-lang.org/).  This was\n> relatively easy to do except for a few places where gitweb.css\n> specifies formatting for generic tags like `body', `table', and `td',\n> which messed up our header.\n> \n> Maybe it makes sense to localize these styles to to gitweb specific\n> classes?  (I know that I can just use my own css, but the file is big\n> enough that I prefer avoiding manually merging in updates.)\n\nCan't you just override gitweb's CSS by your own CSS?  Later CSS wins.\nYou can have more than one stylesheet in gitweb (@stylesheets).\n\nWe could give class to `body' element, and the use it for other\nclass-less selectors (`'table', `'td', `a'), but I don't know if this\nsolution would be enought for you.  It means replacing 'body' selector\nby e.g. '.gitweb_body' selector, and e.g. 'a' selector by\n'.gitweb_body a' selector.\n\n\nI'd rather not add 'gitweb' class (or similar) to every element just\nto have common style for all links, tables, table header cells, table\ncells.\n\n\nP.S. while changing static/gitweb.css we could optimize it by removing\nunnecessary parts of selector.  Contrary to what I thought more\ndetailed selector decreases rather than improves performance.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"145140","messageId":"19510.3565.336183.72646@winooski.ccs.neu.edu","threadId":"24332","inReplyTo":"m3y6dmklg0.fsf@localhost.localdomain","subject":"Re: gitweb.css","fromName":"Eli Barzilay","fromEmail":"eli@barzilay.org","sentAt":"2010-07-08T17:42:05Z","receivedAt":"2010-07-08T17:42:05Z","isPatch":false,"sender":{"key":"eli@barzilay.org","avatar":"https://avatars.githubusercontent.com/u/185905?v=4"},"body":"On Jul  8, Jakub Narebski wrote:\n> Eli Barzilay <eli@barzilay.org> writes:\n> \n> > I've been customizing a gitweb server to fit with the rest of our\n> > project pages (the result is http://git.racket-lang.org/).  This was\n> > relatively easy to do except for a few places where gitweb.css\n> > specifies formatting for generic tags like `body', `table', and `td',\n> > which messed up our header.\n> > \n> > Maybe it makes sense to localize these styles to to gitweb specific\n> > classes?  (I know that I can just use my own css, but the file is big\n> > enough that I prefer avoiding manually merging in updates.)\n> \n> Can't you just override gitweb's CSS by your own CSS?  Later CSS\n> wins.  You can have more than one stylesheet in gitweb\n> (@stylesheets).\n\nI know -- and I'm using that.  The problem is if there's a property\nthat we're not defining, then it won't get overridden -- and doing so\nrequires knowing what the default value is, and keeping our css\nupdated for future extensions (eg, if tomorrow you make add\n`font-family' to the `table' entry, we'll need to add one too, etc).\nAnd still, this means overriding your settings, which were probably\ndone for a reason...\n\n\n> [...]\n> I'd rather not add 'gitweb' class (or similar) to every element just\n> to have common style for all links, tables, table header cells,\n> table cells.\n\nWhy not add just a <div class=\".gitweb\"> container for all gitweb\ncontent, then have css for \".gitweb foo\" for anything you want?\n\n-- \n          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:\n                    http://barzilay.org/                   Maze is Life!\n"},{"id":"145142","messageId":"201007082049.23550.jnareb@gmail.com","threadId":"24332","inReplyTo":"19510.3565.336183.72646@winooski.ccs.neu.edu","subject":"Re: gitweb.css","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-07-08T18:49:22Z","receivedAt":"2010-07-08T18:49:22Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Thu, 8 Jul 2010, Eli Barzilay wrote:\n> On Jul 8 Jakub Narebski wrote:\n>> Eli Barzilay <eli@barzilay.org> writes:\n>> \n>>> I've been customizing a gitweb server to fit with the rest of our\n>>> project pages (the result is http://git.racket-lang.org/). This was\n>>> relatively easy to do except for a few places where gitweb.css\n>>> specifies formatting for generic tags like `body' `table' and `td' \n>>> which messed up our header.\n>>> \n>>> Maybe it makes sense to localize these styles to to gitweb specific\n>>> classes? (I know that I can just use my own css but the file is big\n>>> enough that I prefer avoiding manually merging in updates.)\n>> \n>> Can't you just override gitweb's CSS by your own CSS? Later CSS\n>> wins. You can have more than one stylesheet in gitweb\n>> (@stylesheets).\n> \n> I know -- and I'm using that. The problem is if there's a property\n> that we're not defining then it won't get overridden -- and doing so\n> requires knowing what the default value is and keeping our css\n> updated for future extensions (eg if tomorrow you make add\n> `font-family' to the `table' entry we'll need to add one too etc).\n> And still this means overriding your settings which were probably\n> done for a reason...\n\nAh, all right.  I think I understand your problem, then.\n \nThe problem is that in included GITWEB_SITE_HEADER, GITWEB_HOMETEXT\nand GITWEB_SITE_FOOTER gitweb style applies to links and tables, and\nyou want to have own style based on default HTML style values, isn't\nit?\n \n>> [...]\n>> I'd rather not add 'gitweb' class (or similar) to every element just\n>> to have common style for all links tables table header cells \n>> table cells.\n> \n> Why not add just a <div class=\".gitweb\"> container for all gitweb\n> content then have css for \".gitweb foo\" for anything you want?\n\nFirst, I dislike this solution.\n\nSecond, similar solution would be beter, namely consistent division of\npage into gitweb_header, gitweb_body and gitweb_footer, moving style\nof 'body' to gitweb_*, and 'table' etc. to '.gitweb_body table'.  The\nproblem is with the way CSS is structured currently: I had problems\nwith some elements losing their margin, and some elements having double\nmargin.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"145145","messageId":"19510.8063.606085.233114@winooski.ccs.neu.edu","threadId":"24332","inReplyTo":"201007082049.23550.jnareb@gmail.com","subject":"Re: gitweb.css","fromName":"Eli Barzilay","fromEmail":"eli@barzilay.org","sentAt":"2010-07-08T18:57:03Z","receivedAt":"2010-07-08T18:57:03Z","isPatch":false,"sender":{"key":"eli@barzilay.org","avatar":"https://avatars.githubusercontent.com/u/185905?v=4"},"body":"On Jul  8, Jakub Narebski wrote:\n> Ah, all right.  I think I understand your problem, then.\n>  \n> The problem is that in included GITWEB_SITE_HEADER, GITWEB_HOMETEXT\n> and GITWEB_SITE_FOOTER gitweb style applies to links and tables, and\n> you want to have own style based on default HTML style values, isn't\n> it?\n\nYes, sorry for not clarifying that I'm using the header/footer\nfeature.\n\n\n> >> [...]\n> >> I'd rather not add 'gitweb' class (or similar) to every element just\n> >> to have common style for all links tables table header cells \n> >> table cells.\n> > \n> > Why not add just a <div class=\".gitweb\"> container for all gitweb\n> > content then have css for \".gitweb foo\" for anything you want?\n> \n> First, I dislike this solution.\n\nI don't like it either -- but having similar problems in the past it\nlooked like the most convenient way to deal with such problems.\n(Specifically, it doesn't require changing all elements in the page.)\n\n\n> Second, similar solution would be beter, namely consistent division\n> of page into gitweb_header, gitweb_body and gitweb_footer, moving\n> style of 'body' to gitweb_*, and 'table' etc. to '.gitweb_body\n> table'.  The problem is with the way CSS is structured currently: I\n> had problems with some elements losing their margin, and some\n> elements having double margin.\n\nThis is similar enough that I don't see any difference :)\n\nAs for the `gitweb_header' and `gitweb_footer' -- do you mean the user\nincluded files?  If so, it doesn't sounds like something that is\nneeded, since users can do any formatting that they want there,\nincluding using some of the gitweb classes.  Another point to consider\nhere: I found it convenient that the header/footer are included as is,\nwe have a bunch of stuff in the header -- and our footer is \"</div>\",\nso wrapping them with some div will break this use.\n\n-- \n          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:\n                    http://barzilay.org/                   Maze is Life!\n"},{"id":"145151","messageId":"201007082125.59544.jnareb@gmail.com","threadId":"24332","inReplyTo":"19510.8063.606085.233114@winooski.ccs.neu.edu","subject":"Re: gitweb.css","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-07-08T19:25:58Z","receivedAt":"2010-07-08T19:25:58Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Thu, 8 July 2010, Eli Barzilay wrote:\n> On Jul 8 Jakub Narebski wrote:\n\n>>>> [...]\n>>>> I'd rather not add 'gitweb' class (or similar) to every element just\n>>>> to have common style for all links tables table header cells \n>>>> table cells.\n>>> \n>>> Why not add just a <div class=\".gitweb\"> container for all gitweb\n>>> content then have css for \".gitweb foo\" for anything you want?\n>> \n>> First I dislike this solution.\n> \n> I don't like it either -- but having similar problems in the past it\n> looked like the most convenient way to deal with such problems.\n> (Specifically it doesn't require changing all elements in the page.)\n\nI like the variant described below significantly more, even if it is\nsimilar.\n\n>> Second similar solution would be beter namely consistent division\n>> of page into gitweb_header gitweb_body and gitweb_footer moving\n>> style of 'body' to gitweb_* and 'table' etc. to '.gitweb_body\n>> table'. The problem is with the way CSS is structured currently: I\n>> had problems with some elements losing their margin and some\n>> elements having double margin.\n> \n> This is similar enough that I don't see any difference :)\n> \n> As for the `gitweb_header' and `gitweb_footer' -- do you mean the user\n> included files? If so it doesn't sounds like something that is\n> needed since users can do any formatting that they want there \n> including using some of the gitweb classes. Another point to consider\n> here: I found it convenient that the header/footer are included as is \n> we have a bunch of stuff in the header -- and our footer is \"</div>\" \n> so wrapping them with some div will break this use.\n\nNo, what I meant here is that the structure of gitweb page should look\nlike the following, in pseudocode:\n\n  <body>\n\n  [% GITWEB_SITE_HEADER %]\n\n  <div class=\"gitweb_header\"> <!-- or page_header -->\n  breadcrumbs\n  logo, search box\n  perhaps navigation menu and subnavigation menu\n  </div>\n\n  [% if ($action eq 'project_list') HOME_TEXT %]\n\n  <div class=\"gitweb_body\"> \n\n  ...\n\n  </div>\n\n  <div class=\"gitweb_footer\">\n  stuff generated by git_footer_html()\n  </div>\n\n  [% GITWEB_SITE_FOOTER %]\n\n  <script src=\"static/gitweb.js\"></script> <!-- if needed -->\n\n  </body>\n\n-- \nJakub Narebski\nPoland\n"},{"id":"145153","messageId":"19510.10079.395353.55808@winooski.ccs.neu.edu","threadId":"24332","inReplyTo":"201007082125.59544.jnareb@gmail.com","subject":"Re: gitweb.css","fromName":"Eli Barzilay","fromEmail":"eli@barzilay.org","sentAt":"2010-07-08T19:30:39Z","receivedAt":"2010-07-08T19:30:39Z","isPatch":false,"sender":{"key":"eli@barzilay.org","avatar":"https://avatars.githubusercontent.com/u/185905?v=4"},"body":"On Jul  8, Jakub Narebski wrote:\n> \n> No, what I meant here is that the structure of gitweb page should look\n> like the following, in pseudocode: [...]\n\nAh -- dividing the gitweb content to header/content/footer -- that\nmakes perfect sense.\n\n-- \n          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:\n                    http://barzilay.org/                   Maze is Life!\n"}]}