@@ -41,14 +41,30 @@ javadoc {
4141 if (! srcApi. directory) throw new GradleScriptException (" Not a directory: ${ srcApi} " , null )
4242 source + = srcApi
4343 doLast {
44+ // Note: frequently check the vanilla stylesheet.css if values still match.
45+ def stylesheetPath = " $buildDir /docs/javadoc/stylesheet.css"
46+
4447 // Primary background
45- ant. replace(file : " build/docs/javadoc/stylesheet.css " , token : " background-color: #4D7A97" , value : " background-color: #17A6A6" )
48+ ant. replace(file : stylesheetPath , token : " #4D7A97" , value : " #17A6A6" )
4649
4750 // "Active" background
48- ant. replace(file : " build/docs/javadoc/stylesheet.css " , token : " background-color: #F8981D" , value : " background-color: #7DDC7D" )
51+ ant. replace(file : stylesheetPath , token : " #F8981D" , value : " #7DDC7D" )
4952
5053 // Hover
51- ant. replace(file : " build/docs/javadoc/stylesheet.css" , token : " color:#bb7a2a" , value : " color:#E61955" )
54+ ant. replace(file : stylesheetPath, token : " #bb7a2a" , value : " #E61955" )
55+
56+ // Note: in CSS stylesheets the last added rule wins, so append to default stylesheet.
57+ // Code blocks
58+ file(stylesheetPath). append(" pre {\n white-space: normal;\n overflow-x: auto;\n }\n " )
59+ // Member summary tables
60+ file(stylesheetPath). append(" .memberSummary {\n overflow: auto;\n }\n " )
61+ // Descriptions and signatures
62+ file(stylesheetPath). append(" .block {\n " +
63+ " display:block;\n " +
64+ " margin:3px 10px 2px 0px;\n " +
65+ " color:#474747;\n " +
66+ " overflow:auto;\n " +
67+ " }" )
5268 }
5369}
5470
0 commit comments