Gitweb CSS cleanup: container divs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Current gitweb style is that bottom-level elements (elements which 
contain some contents) have 8px padding, and each of element has 
"padding: 8px" in CSS separately.

There exists few container divs, i.e. divs which have only other divs
as contents, and no unwrapped text element. Examples incude "page_body", 
"patchset", "patch" divs.

Because container divs (usually) should not have any padding, it is not 
possible to simplify CSS by using 8px for all divs, with some 
exceptions.

This situation causes that sometimes padding is not added, like for 
projects README on project summary page ("summary" view), and sometimes 
unnecessary padding is added causing excessive spacing or wrong style, 
like for "commitdiff" view. It would be nice to have CSS streamlined 
(cleaned up / refactored) to avoid such errors in gitweb styling, minor 
they are.

There are few possible solutions:

1. Get rid of all container divs, or all except toplevel container divs,
   and make "padding: 4px" default style for all divs. This migh make
   styling harder, and make us to add unnecessary classes for styling,
   where the fact that some element is in some (container) div would be
   enough otherwise for selecting element for styling (class-itis).

2. Current solution, i.e. add "padding: 4px" for each 'contents' div,
   and set "padding: 0px" for each 'container' div if needed.  Error
   prone.

3. Set either "contents" class for each 'contents' div (similar to
   current solution, error prone when adding new contents), or
   "container" class for each 'container' div (bit less error prone,
   as adding containers should be more rare than adding contents divs)

4. Enumerate 'container' div in CSS, set default padding as for
   'contents' div.

I opt for solution 4., together with perhaps restucturing gitweb.css
-- 
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]