public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail•com>
To: git@vger•kernel.org
Subject: Gitweb CSS cleanup: container divs
Date: Fri, 27 Apr 2007 16:48:24 +0200	[thread overview]
Message-ID: <200704271648.24963.jnareb@gmail.com> (raw)

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

                 reply	other threads:[~2007-04-27 14:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200704271648.24963.jnareb@gmail.com \
    --to=jnareb@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox