Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4494033

stddoclet: Text not visible if Windows color scheme set to white text

XMLWordPrintable

    • b61
    • generic, x86, sparc
    • generic, solaris_9, windows_xp

      Name: yyT116575 Date: 08/20/2001

      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

      Setting the Windows Display > Appearance dialog box to a setting that
      displays white text causes the text in Javadoc to be white, producing
      unreadable white text on white background. The background remains white
      due to its setting in stylesheet.css (which the Appearance dialog box
      does not override).

      To demonstrate:

      1. Go into the Windows Control Panel's Display, Appearance dialog (or
      equivalent on other systems), and select the "high contrast black" color
      scheme. Or, for a more attractive option, create your own scheme that has a
      dark background (dark blue?) and white text.

      2. Open any JavaDoc-generated package documentation. Most of the API
      description is invisible, being white text on white background.

      The problem occurs because the JavaDoc style sheet (stylesheet.css) forces a
      white background on all table rows and the document body, but fails to set a
      text color. When the text color is left undefined like this, the operating
      system will draw the text in the system's text color. In this case, that color
      is white, resulting in white text on JavaDoc's white background.

      Here is the example of the error in JavaDoc's "stylesheet.css":

      /* Table colors */
      .TableHeadingColor { background: #CCCCFF } /* Dark mauve */
      .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
      .TableRowColor { background: #FFFFFF } /* White */

      Notice that there's no mention of the text color above. How do we know if it
      isn't also #FFFFFF?

      Here's the corrected version:

      /* Table colors */
      .TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve
      with black text */
      .TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve
      with black text*/
      .TableRowColor { background: #FFFFFF; color:#000000 } /* White with
      black text*/


      Whenever an interface specifies a background color, it must also specify
      a text color.

      Below is the complete STYLESHEET.CSS, corrected:

      /* Javadoc style sheet */

      /* Define colors, fonts and other style attributes here to override the defaults */

      /* Page background color */
      body { background-color: #FFFFFF; color:#000000 }

      /* Table colors */
      .TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */
      .TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */
      .TableRowColor { background: #FFFFFF; color:#000000 } /* White */

      /* Font used in left-hand frame lists */
      .FrameTitleFont { font-family: normal; color:#000000 }
      .FrameHeadingFont { font-family: normal; color:#000000 }
      .FrameItemFont { font-family: normal; color:#000000 }

      /* Example of smaller, sans-serif font in frames */
      /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */

      /* Navigation bar fonts and colors */
      .NavBarCell1 { background-color:#EEEEFF; color:#000000}/* Light mauve */
      .NavBarCell1Rev { background-color:#00008B; color:#FFFFFF}/* Dark Blue */
      .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
      .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}

      .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-
      color:#FFFFFF; color:#000000}
      .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-
      color:#FFFFFF; color:#000000}
      (Review ID: 130325)
      ======================================================================

            jhosunw Jamie Ho (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: