Skip to content
Permalink
Browse files
8267853: Remove unused styles from stylesheet
Reviewed-by: prappo
  • Loading branch information
hns committed Oct 5, 2021
1 parent 4e3948f commit e1f0df0de3b205cecdb1aa1d74562536c06097dd
Showing 3 changed files with 7 additions and 46 deletions.
@@ -102,11 +102,6 @@ button {
/*
* Styles for document title and copyright.
*/
.clear {
clear:both;
height:0;
overflow:hidden;
}
.about-language {
float:right;
padding:0 21px 8px 8px;
@@ -117,13 +112,6 @@ button {
.legal-copy {
margin-left:.5em;
}
.tab {
background-color:#0066FF;
color:#ffffff;
padding:8px;
width:5em;
font-weight:bold;
}
/*
* Styles for navigation bar.
*/
@@ -233,7 +221,7 @@ ul.sub-nav-list li {
}
}
/*
* Styles for page header and footer.
* Styles for page header.
*/
.title {
color:#2c4557;
@@ -246,7 +234,7 @@ ul.sub-nav-list li {
margin:0 0 15px 0;
padding:0;
}
.header ul li, .footer ul li {
.header ul li {
list-style:none;
font-size:13px;
}
@@ -476,15 +464,9 @@ div.table-tabs > button.table-tab {
.col-first a:link, .col-first a:visited,
.col-second a:link, .col-second a:visited,
.col-constructor-name a:link, .col-constructor-name a:visited,
.col-summary-item-name a:link, .col-summary-item-name a:visited,
.constant-values-container a:link, .constant-values-container a:visited,
.all-classes-container a:link, .all-classes-container a:visited,
.all-packages-container a:link, .all-packages-container a:visited {
.col-summary-item-name a:link, .col-summary-item-name a:visited {
font-weight:bold;
}
.table-sub-heading-color {
background-color:#EEEEFF;
}
.even-row-color, .even-row-color .table-header {
background-color:#FFFFFF;
}
@@ -494,10 +476,6 @@ div.table-tabs > button.table-tab {
/*
* Styles for contents.
*/
.deprecated-content {
margin:0;
padding:10px 0;
}
div.block {
font-size:14px;
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
@@ -539,18 +517,13 @@ div.block {
color:green;
padding:0 30px 0 0;
}
h1.hidden {
visibility:hidden;
overflow:hidden;
font-size:10px;
}
.block {
display:block;
margin:0 10px 5px 0;
color:#474747;
}
.deprecated-label, .description-from-type-label, .implementation-label, .member-name-label, .member-name-link,
.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type,
.module-label-in-package, .module-label-in-type, .package-label-in-type,
.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label {
font-weight:bold;
}
@@ -112,7 +112,7 @@ void run() throws Exception {
// summary and details tables; styles for these may be present in the stylesheet
// using constructs like these:
// .summary section[class$="-summary"], .details section[class$="-details"],
htmlStyleNames.removeIf(s -> s.endsWith("-details"));
htmlStyleNames.removeIf(s -> s.endsWith("-details") && !styleSheetNames.contains(s));
htmlStyleNames.removeIf(s -> s.endsWith("-summary") && !styleSheetNames.contains(s));

// signature classes
@@ -138,23 +138,14 @@ void run() throws Exception {
removeAll(styleSheetNames, "result-highlight", "result-item",
"search-tag-desc-result", "search-tag-holder-result",
"ui-autocomplete", "ui-autocomplete-category",
"watermark");
"watermark", "expanded");

// snippet-related
removeAll(styleSheetNames, "bold", "highlighted", "italic");

// very JDK specific
styleSheetNames.remove("module-graph");

// apparently unused
// "tab" is commented implying it is in the header/footer, but
// (a) it is a poorly chosen name
// (b) it does not seem to be used in make/Docs.gmk or anywhere else
removeAll(styleSheetNames, "all-classes-container", "all-packages-container",
"clear", "constant-values-container", "deprecated-content", "expanded",
"footer", "hidden", "override-specify-label", "serialized-class-details",
"tab", "table-sub-heading-color");

boolean ok = check(htmlStyleNames, "HtmlStyle", styleSheetNames, "stylesheet")
& check(styleSheetNames, "stylesheet", htmlStyleNames, "HtmlStyle");

@@ -160,10 +160,7 @@ public void test(Path base) {
.col-first a:link, .col-first a:visited,
.col-second a:link, .col-second a:visited,
.col-constructor-name a:link, .col-constructor-name a:visited,
.col-summary-item-name a:link, .col-summary-item-name a:visited,
.constant-values-container a:link, .constant-values-container a:visited,
.all-classes-container a:link, .all-classes-container a:visited,
.all-packages-container a:link, .all-packages-container a:visited {
.col-summary-item-name a:link, .col-summary-item-name a:visited {
font-weight:bold;
}""",
"""

2 comments on commit e1f0df0

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on e1f0df0 Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirabilos
Copy link

@mirabilos mirabilos commented on e1f0df0 Apr 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mirabilos, thanks for making a comment in an OpenJDK project!

All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user mirabilos for the summary.

If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.

Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.

Please sign in to comment.