Commit:    bd41f601f3e4cd471a4f48e641873738b4d69224
Author:    Levi Morrison <[email protected]>         Mon, 15 Jul 2013 09:09:11 -0600
Parents:   7a7d428dc86cd4c3da35affb3de00816f3056428
Branches:  responsive

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

Log:
Descriptions are now styled more consistently. You can now click parameters 
anywhere on the page (not just the method description) and it will take you to 
the definition.

Changed paths:
  M  js/common.js
  M  styles/doc.css


Diff:
diff --git a/js/common.js b/js/common.js
index 8136b2f..8095588 100644
--- a/js/common.js
+++ b/js/common.js
@@ -191,12 +191,18 @@ $(document).ready(function() {
     });
     var scrollHeightOfHeadnav = - 
document.getElementById('head-nav').scrollHeight;
     scrollHeightOfHeadnav -= 12; //some margin
-    $docs.find(".methodparam .parameter").each(function () {
+    $parameters = $(".parameters .term .parameter");
+    $docs.find(".refsect1 .parameter").each(function () {
         var $node = $(this);
-        $(".parameters .term .parameter").each(function (idx, param) {
+        var $nodeText = $node.text();
+        if ($nodeText[0].charAt(0) === '$') {
+            $nodeText = $nodeText.substring(1);
+        }
+        $parameters.each(function (idx, param) {
             var $param = $(param);
-            if ($param.text() == $node.text().substring(1)) {
+            if ($param.text() == $nodeText) {
                 $node.click(function() {
+                    console.log("Clicked parameter");
                     $.scrollTo($param, 600, 
{'offset':{'top':scrollHeightOfHeadnav}});
                 });
             }
diff --git a/styles/doc.css b/styles/doc.css
index 86598ae..5820d0a 100755
--- a/styles/doc.css
+++ b/styles/doc.css
@@ -60,7 +60,7 @@ aside#quicktoc {
     border-color:#458;
 }
 
-.docs .refsect1 .methodparam .parameter {
+.docs .refsect1 .parameter {
     cursor:pointer;
 }
 .docs .refsect1 dt {
@@ -73,22 +73,16 @@ aside#quicktoc {
 }
 .docs .refsect1 code.parameter {
     font-size:16px;
+    font-weight:bold;
 }
 .docs .methodname strong {
     font-style:normal;
 }
-.docs .initializer {
-    font-style:italic;
+.docs .initializer,
+.docs .initializer code {
+    font-style:italic !important;
     color:#b14;
 }
-.docs .classsynopsis .parameter {
-    font-size:1.167em;
-}
-
-.docs i .parameter, .docs em .parameter {
-    font-style: normal;
-}
-
 /* }}} */
 
 
@@ -164,12 +158,18 @@ aside#quicktoc {
 
 /* }}} */
 
-.docs .refentry .constructorsynopsis,
-.docs .refentry .methodsynopsis {
-    color: #666;
-    font:normal 16px / 24px "Source Code Pro", monospace;
+.docs .dc-description,
+.docs .dc-description code {
+    font-weight:400;
+    font-size:16px;
+    font-family:"Source Code Pro", monospace;
+    letter-spacing:-.0625em;
+    word-spacing:-.125em;
     margin:0;
 }
+.docs .dc-description {
+    color:#666;
+}
 
 /* {{{ Parameter listing */
 .docs .refentry .parameters dl {
@@ -200,7 +200,7 @@ aside#quicktoc {
     padding: .75em .625em;
     border:1px solid #ccc;
 }
-.docs .refsect1 .dc-description {
+.docs .dc-description {
     background-color: #fafafc;
     padding: .625em .75em;
     box-shadow:inset 0 1px 2px 0 rgba(0,0,0,.25);


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

Reply via email to