{"thread":{"id":"7872","subject":"Gitweb CSS cleanup: container divs","startedAt":"2007-04-27T14:48:24Z","lastAt":"2007-04-27T14:48:24Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"40597","messageId":"200704271648.24963.jnareb@gmail.com","threadId":"7872","inReplyTo":null,"subject":"Gitweb CSS cleanup: container divs","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-04-27T14:48:24Z","receivedAt":"2007-04-27T14:48:24Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Current gitweb style is that bottom-level elements (elements which \ncontain some contents) have 8px padding, and each of element has \n\"padding: 8px\" in CSS separately.\n\nThere exists few container divs, i.e. divs which have only other divs\nas contents, and no unwrapped text element. Examples incude \"page_body\", \n\"patchset\", \"patch\" divs.\n\nBecause container divs (usually) should not have any padding, it is not \npossible to simplify CSS by using 8px for all divs, with some \nexceptions.\n\nThis situation causes that sometimes padding is not added, like for \nprojects README on project summary page (\"summary\" view), and sometimes \nunnecessary padding is added causing excessive spacing or wrong style, \nlike for \"commitdiff\" view. It would be nice to have CSS streamlined \n(cleaned up / refactored) to avoid such errors in gitweb styling, minor \nthey are.\n\nThere are few possible solutions:\n\n1. Get rid of all container divs, or all except toplevel container divs,\n   and make \"padding: 4px\" default style for all divs. This migh make\n   styling harder, and make us to add unnecessary classes for styling,\n   where the fact that some element is in some (container) div would be\n   enough otherwise for selecting element for styling (class-itis).\n\n2. Current solution, i.e. add \"padding: 4px\" for each 'contents' div,\n   and set \"padding: 0px\" for each 'container' div if needed.  Error\n   prone.\n\n3. Set either \"contents\" class for each 'contents' div (similar to\n   current solution, error prone when adding new contents), or\n   \"container\" class for each 'container' div (bit less error prone,\n   as adding containers should be more rare than adding contents divs)\n\n4. Enumerate 'container' div in CSS, set default padding as for\n   'contents' div.\n\nI opt for solution 4., together with perhaps restucturing gitweb.css\n-- \nJakub Narebski\nPoland\n"}]}