* Gitweb CSS cleanup: container divs
@ 2007-04-27 14:48 Jakub Narebski
0 siblings, 0 replies; only message in thread
From: Jakub Narebski @ 2007-04-27 14:48 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-27 14:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-27 14:48 Gitweb CSS cleanup: container divs Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).