]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Do not use absolute font sizes
authorPetr Baudis <redacted>
Wed, 9 May 2007 01:41:50 +0000 (03:41 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
Avoid specifying font sizes in pixels, since that is just pure evil.
Pointed out by Chris Riddoch.

Note that this is pretty much just a proposal; I didn't test if everything
fits perfectly right, but things seem to be pretty much okay. repo.or.cz
uses it now as a test drive - if you find any visual quirks, please point
them out, with a patch if possible since I'm total CSS noob and debugging
CSS is an extremely painful experience for me.

Note that this patch actually does change visual look of gitweb in Firefox
with my resolution and default settings - everything is bigger and I can't
explain the joy of actually seeing gitweb text that is in _readable_ size;
also, my horizontal screen real estate feels better used now. But judging
from the look of most modern webpages on the 'net, most people prefer
reading the web with strained eyes and/or a magnifying glass (I wonder what
species of scientists should look into this mystifying phenomenon) - so,
please tell us what you think.

Maybe we might want to get rid of absolute sizes other than font sizes in
the CSS file too in the long term.

Signed-off-by: Petr Baudis <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.css

index f87636e23064a9b1c003ffd2ed40d8d88e48d17d83568b64f5eb9bd6c80e48de..88fb3c4e638719fb8aea51e83e64aca2338964825d5191fccaf8ed5a6d211fe6 100644 (file)
@@ -1,6 +1,5 @@
 body {
        font-family: sans-serif;
-       font-size: 12px;
        border: solid #d9d8d1;
        border-width: 1px;
        margin: 10px;
@@ -31,7 +30,7 @@ img.logo {
 div.page_header {
        height: 25px;
        padding: 8px;
-       font-size: 18px;
+       font-size: 150%;
        font-weight: bold;
        background-color: #d9d8d1;
 }
@@ -113,7 +112,7 @@ span.signoff {
 
 div.log_link {
        padding: 0px 8px;
-       font-size: 10px;
+       font-size: 70%;
        font-family: sans-serif;
        font-style: normal;
        position: relative;
@@ -204,13 +203,13 @@ table.blame {
 
 table.blame td {
        padding: 0px 5px;
-       font-size: 12px;
+       font-size: 100%;
        vertical-align: top;
 }
 
 th {
        padding: 2px 5px;
-       font-size: 12px;
+       font-size: 100%;
        text-align: left;
 }
 
@@ -232,14 +231,14 @@ tr.dark:hover {
 
 td {
        padding: 2px 5px;
-       font-size: 12px;
+       font-size: 100%;
        vertical-align: top;
 }
 
 td.link, td.selflink {
        padding: 2px 5px;
        font-family: sans-serif;
-       font-size: 10px;
+       font-size: 70%;
 }
 
 td.selflink {
@@ -416,7 +415,7 @@ div.index_include {
 }
 
 div.search {
-       font-size: 12px;
+       font-size: 100%;
        font-weight: normal;
        margin: 4px 8px;
        position: absolute;
@@ -444,7 +443,7 @@ a.rss_logo {
        background-color: #ff6600;
        font-weight: bold;
        font-family: sans-serif;
-       font-size: 10px;
+       font-size: 70%;
        text-align: center;
        text-decoration: none;
 }
@@ -455,7 +454,7 @@ a.rss_logo:hover {
 
 span.refs span {
        padding: 0px 4px;
-       font-size: 10px;
+       font-size: 70%;
        font-weight: normal;
        border: 1px solid;
        background-color: #ffaaff;
This page took 0.246501 seconds and 4 git commands to generate.