com web/php: Snipe selectors and fix parameter scrollto: js/common.js styles/theme-medium.css

From: Date: Fri, 06 Dec 2013 05:26:58 +0000
Subject: com web/php: Snipe selectors and fix parameter scrollto: js/common.js styles/theme-medium.css
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-22373@lists.php.net to get a copy of this message
Commit: c47f4f108a73ea027479efd48ddd40e0fd652c59 Author: Dejan Marjanovic <dejan.marjanovic@gmail.com> Fri, 6 Dec 2013 06:26:58 +0100 Parents: ec6600f541a8742ee5f6e87338155d35abe6c5a2 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=c47f4f108a73ea027479efd48ddd40e0fd652c59 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; +} /* }}} */

« previous php.webmaster (#22373) next »