Commit:    2a3b5f9ef84b349b556a982de794e33d9213e078
Author:    Dejan Marjanovic <[email protected]>         Fri, 6 Dec 
2013 06:26:58 +0100
Parents:   71a809e31c100dffde75b340ec4e45ca3950686b
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=2a3b5f9ef84b349b556a982de794e33d9213e078

Log:
Snipe selectors and fix parameter scrollto

Changed paths:
  M  js/common.js
  M  styles/theme-medium.css


Diff:
diff --git a/js/common.js b/js/common.js
index dfa4775..f29da55 100755
--- a/js/common.js
+++ b/js/common.js
@@ -78,7 +78,9 @@ $(document).ready(function() {
     $('.refentry code.parameter').click(function(event)
     {
       var id = $(this).text().replace(/^[&$]{0,2}/g, '');
-      var offsetTop = $('.parameters .parameter:contains("' + id + 
'")').offset().top - 52;
+      var offsetTop = $(
+        '.parameters .parameter:contains("' + id + '"), .options 
.parameter:contains("' + id + '")'
+      ).offset().top - 52;
       $.scrollTo({top: offsetTop, left: 0}, 400);
     });
 
@@ -302,6 +304,11 @@ $(document).ready(function() {
   }
 /* }}} */
 
+/* {{{ Remove "inline code" style from .parameter */
+  // CSS3 can't traverse up the DOM tree
+  $('code.parameter').closest('em').addClass('reset');
+/* }}} */
+
 });
 
 /**
diff --git a/styles/theme-medium.css b/styles/theme-medium.css
index 12ecdfc..10d6ed1 100755
--- a/styles/theme-medium.css
+++ b/styles/theme-medium.css
@@ -303,10 +303,11 @@ div.phpcode span.string {
   background-color: transparent;
 }
 
-.para em, 
+.para em:not(.emphasis), 
 .para var,
-.simpara em,
-.simpara var
+.simpara em:not(.emphasis),
+.simpara var,
+.tbody em:not(.emphasis)
 {
   background-color: #F9F2F4;
   border-radius: 4px;
@@ -317,6 +318,13 @@ div.phpcode span.string {
   font-style: normal;
   font: normal 14px / 1.46 "Source Code Pro", monospace; 
 }
+
+em.reset, var.reset
+{
+  background: none !important;
+  padding: 0 !important;
+  font-size: 1em !important;
+}
 /* }}} */


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to