gitweb: make span.age CSS selector more specific
authorAnton Shestakov <av6@dwimlabs.net>
Thu, 15 Feb 2018 21:05:31 +0800
changeset 36232 881596e51fca
parent 36231 72812ad205d1
child 36233 7ec5925c971e
gitweb: make span.age CSS selector more specific This set of CSS properties is only used on /changelog page to make age elements float to the left and be fixed in size, but span.a is too broad of a selector, because we don't want to apply these properties to all <span> elements that have age class.
mercurial/templates/static/style-gitweb.css
tests/test-hgweb.t
--- a/mercurial/templates/static/style-gitweb.css	Thu Feb 15 17:30:43 2018 -0500
+++ b/mercurial/templates/static/style-gitweb.css	Thu Feb 15 21:05:31 2018 +0800
@@ -29,7 +29,7 @@
 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
 div.log_body { padding:8px 8px 8px 150px; }
 .age { white-space:nowrap; }
-span.age { position:relative; float:left; width:142px; font-style:italic; }
+a.title span.age { position:relative; float:left; width:142px; font-style:italic; }
 div.log_link {
 	padding:0px 8px;
 	font-size:10px; font-family:sans-serif; font-style:normal;
--- a/tests/test-hgweb.t	Thu Feb 15 17:30:43 2018 -0500
+++ b/tests/test-hgweb.t	Thu Feb 15 21:05:31 2018 +0800
@@ -340,7 +340,7 @@
 
   $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server
   200 Script output follows
-  content-length: 9118
+  content-length: 9126
   content-type: text/css
   
   body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
@@ -374,7 +374,7 @@
   div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
   div.log_body { padding:8px 8px 8px 150px; }
   .age { white-space:nowrap; }
-  span.age { position:relative; float:left; width:142px; font-style:italic; }
+  a.title span.age { position:relative; float:left; width:142px; font-style:italic; }
   div.log_link {
   	padding:0px 8px;
   	font-size:10px; font-family:sans-serif; font-style:normal;