[PATCH 2 of 6] style: add class 'normal-indent' instead of repeated explicit margins

Thomas De Schampheleire patrickdepinguin at gmail.com
Tue Mar 3 16:40:29 EST 2015


# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1425415064 -3600
#      Tue Mar 03 21:37:44 2015 +0100
# Node ID a076460a649e0e6fd03a530512fbcd838fe52ee5
# Parent  c3adb366628c8e7a5cfa016801a7c2f44abc312b
style: add class 'normal-indent' instead of repeated explicit margins

Add a new CSS class for the standard indentation inside the main box,
instead of repeating 'style="..."' statements on the relevant elements.

Ideally, this class should not exist as the necessary padding would be added
to the main box itself, but reworking this is a bigger exercise (to be done
later).

diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css
--- a/kallithea/public/css/style.css
+++ b/kallithea/public/css/style.css
@@ -933,6 +933,10 @@
     padding-bottom: 2px;
 }
 
+#content div.box div.normal-indent {
+    margin: 0 20px 10px 20px;
+}
+
 #content div.box p {
     color: #5f5f5f;
     font-size: 12px;
diff --git a/kallithea/templates/pullrequests/pullrequest_show_all.html b/kallithea/templates/pullrequests/pullrequest_show_all.html
--- a/kallithea/templates/pullrequests/pullrequest_show_all.html
+++ b/kallithea/templates/pullrequests/pullrequest_show_all.html
@@ -44,7 +44,7 @@
         </ul>
     </div>
 
-    <div style="margin: 0 20px 10px 20px">
+    <div class="normal-indent">
         <div>
         %if c.closed:
             ${h.link_to(_('Hide closed pull requests (only show open pull requests)'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_))}
diff --git a/kallithea/templates/pullrequests/pullrequest_show_my.html b/kallithea/templates/pullrequests/pullrequest_show_my.html
--- a/kallithea/templates/pullrequests/pullrequest_show_my.html
+++ b/kallithea/templates/pullrequests/pullrequest_show_my.html
@@ -20,7 +20,7 @@
         ${self.breadcrumbs()}
     </div>
 
-    <div style="margin: 0 20px">
+    <div class="normal-indent">
         <div>
         %if c.closed:
             ${h.link_to(_('Hide closed pull requests (only show open pull requests)'), h.url('my_pullrequests'))}


More information about the kallithea-general mailing list