8185369: Clean up the javadoc stylesheet
authorbpatel
Tue, 28 Nov 2017 20:19:29 -0800
changeset 47954 3148be499e41
parent 47953 78a309f079af
child 47955 0887e20e7173
8185369: Clean up the javadoc stylesheet Reviewed-by: jjg
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Wed Nov 29 00:43:59 2017 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Tue Nov 28 20:19:29 2017 -0800
@@ -1,10 +1,16 @@
-/* Javadoc style sheet */
-/*
-Overall document style
-*/
+/* 
+ * Javadoc style sheet
+ */
 
 @import url('resources/fonts/dejavu.css');
 
+/*
+ * Styles for individual HTML elements.
+ *
+ * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
+ * HTML element throughout the page.
+ */
+
 body {
     background-color:#ffffff;
     color:#353833;
@@ -41,9 +47,6 @@
     padding-top:129px;
     margin-top:-129px;
 }
-.searchTagResult:before, .searchTagResult:target {
-    color:red;
-}
 pre {
     font-family:'DejaVu Sans Mono', monospace;
     font-size:14px;
@@ -91,9 +94,16 @@
 sup {
     font-size:8px;
 }
+
 /*
-Document title and Copyright styles
-*/
+ * Styles for HTML generated by javadoc.
+ *
+ * These are style classes that are used by the standard doclet to generate HTML documentation.
+ */
+
+/*
+ * Styles for document title and copyright.
+ */
 .clear {
     clear:both;
     height:0px;
@@ -124,8 +134,8 @@
     font-weight:bold;
 }
 /*
-Navigation bar styles
-*/
+ * Styles for navigation bar.
+ */
 .bar {
     background-color:#4D7A97;
     color:#FFFFFF;
@@ -233,8 +243,8 @@
     overflow:hidden;
 }
 /*
-Page header and footer styles
-*/
+ * Styles for page header and footer.
+ */
 .header, .footer {
     clear:both;
     margin:0 20px;
@@ -277,8 +287,8 @@
     font-size:13px;
 }
 /*
-Heading styles
-*/
+ * Styles for headings.
+ */
 div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
     background-color:#dee3e9;
     border:1px solid #d0d9e0;
@@ -299,8 +309,8 @@
     padding:0px 0 20px 0;
 }
 /*
-Page layout container styles
-*/
+ * Styles for page layout containers.
+ */
 .contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
     clear:both;
     padding:10px 20px;
@@ -346,8 +356,8 @@
     display:inline;
 }
 /*
-List styles
-*/
+ * Styles for lists.
+ */
 li.circle {
     list-style:circle;
 }
@@ -403,8 +413,8 @@
     margin-bottom:1px;
 }
 /*
-Table styles
-*/
+ * Styles for tables.
+ */
 .overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary,
 .requiresSummary, .packagesSummary, .providesSummary, .usesSummary {
     width:100%;
@@ -529,7 +539,6 @@
     position:relative;
     background-color:#4D7A97;
     float:left;
-
 }
 .rowColor th, .altColor th {
     font-weight:normal;
@@ -601,8 +610,8 @@
     background-color:#EEEEEF;
 }
 /*
-Content styles
-*/
+ * Styles for contents.
+ */
 .description pre {
     margin-top:0;
 }
@@ -613,27 +622,22 @@
 .docSummary {
     padding:0;
 }
-
 ul.blockList ul.blockList ul.blockList li.blockList h3 {
     font-style:normal;
 }
-
 div.block {
     font-size:14px;
     font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
 }
-
 td.colLast div {
     padding-top:0px;
 }
-
-
 td.colLast a {
     padding-bottom:3px;
 }
 /*
-Formatting effect styles
-*/
+ * Styles for formatting effect.
+ */
 .sourceLineNo {
     color:green;
     padding:0 30px 0 0;
@@ -668,18 +672,16 @@
     margin-right:10px;
     display:inline-block;
 }
-
 div.block div.deprecationComment, div.block div.block span.emphasizedPhrase,
 div.block div.block span.interfaceName {
     font-style:normal;
 }
-
 div.contentContainer ul.blockList li.blockList h2 {
     padding-bottom:0px;
 }
 /*
-IFRAME specific styles
-*/
+ * Styles for IFRAME.
+ */
 .mainContainer {
     margin:0 auto; 
     padding:0; 
@@ -733,11 +735,14 @@
     margin-bottom:30px;
 }
 /*
-HTML5 specific styles
-*/
+ * Styles specific to HTML5 elements.
+ */
 main, nav, header, footer, section {
     display:block;
 }
+/*
+ * Styles for javadoc search.
+ */
 .ui-autocomplete-category {
     font-weight:bold;
     font-size:15px;
@@ -802,7 +807,9 @@
     font-style:italic;
     font-size:12px;
 }
-
+.searchTagResult:before, .searchTagResult:target {
+    color:red;
+}
 .moduleGraph span {
     display:none;
     position:absolute;
@@ -838,20 +845,17 @@
     margin-top: 10px;
     margin-bottom: 10px;
 }
-
 table.borderless > caption,
 table.plain > caption,
 table.striped > caption {
     font-weight: bold;
     font-size: smaller;
 }
-
 table.borderless th, table.borderless td,
 table.plain th, table.plain td,
 table.striped th, table.striped td {
     padding: 2px 5px;
 }
-
 table.borderless,
 table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
 table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
@@ -860,7 +864,6 @@
 table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
     background-color: transparent;
 }
-
 table.plain {
     border-collapse: collapse;
     border: 1px solid black;
@@ -872,7 +875,6 @@
 table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
     border: 1px solid black;
 }
-
 table.striped {
     border-collapse: collapse;
     border: 1px solid black;
--- a/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java	Wed Nov 29 00:43:59 2017 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java	Tue Nov 28 20:19:29 2017 -0800
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug      4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 8151743 8177417
- *           8175218 8176452 8181215 8182263 8183511 8169819 8183037
+ *           8175218 8176452 8181215 8182263 8183511 8169819 8183037 8185369
  * @summary  Run tests on doclet stylesheet.
  * @author   jamieh
  * @library  ../lib
@@ -50,16 +50,6 @@
         // TODO: most of this test seems a bit silly, since javadoc is simply
         // copying in the stylesheet from the source directory
         checkOutput("stylesheet.css", true,
-                "/* Javadoc style sheet */",
-                "/*\n"
-                + "Overall document style\n"
-                + "*/",
-                "/*\n"
-                + "Heading styles\n"
-                + "*/",
-                "/*\n"
-                + "Navigation bar styles\n"
-                + "*/",
                 "body {\n"
                 + "    background-color:#ffffff;\n"
                 + "    color:#353833;\n"
@@ -173,8 +163,8 @@
                 + "    position:relative;\n"
                 + "    padding-top:129px;\n"
                 + "    margin-top:-129px;\n"
-                + "}\n"
-                + ".searchTagResult:before, .searchTagResult:target {\n"
+                + "}",
+                ".searchTagResult:before, .searchTagResult:target {\n"
                 + "    color:red;\n"
                 + "}",
                 "a[href]:hover, a[href]:focus {\n"