In a report that is formatted using an external cascading style sheet (CSS), a report component inherits formatting from the TD element and from all elements that TD nests within, such as BODY. (Note that inheritance, like all CSS behavior, is implemented by the web browser of each user and is browser-dependent.)
This differs from a report that is formatted using a WebFOCUS StyleSheet, in which a report component inherits formatting from a higher-level component. When you format a report using external cascading style sheet classes, a class assigned to a report component does not inherit formatting from a class that has been assigned to a higher-level component.
This report displays a list of the vendors that supply products to Gotham Grinds. Its formatting instructions specify that:
If the formatting of the report had been specified in a WebFOCUS StyleSheet instead of in an external CSS, PRODUCT_ID would inherit the italic Arial font from its parent report component (that is, from the report data). Instead, because its formatting is specified in an external CSS, PRODUCT_ID inherits formatting from the rule for the TD element, not from a higher-level report component, and so it does not inherit the italic Arial font.
The report request and inline WebFOCUS StyleSheet are shown in the following procedure, prodvend.fex. The external cascading style sheet, named report02.css, follows the procedure.
prodvend.fex
TABLE FILE GGPRODS PRINT PRODUCT_DESCRIPTION VENDOR_NAME BY PRODUCT_ID ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE * 1. TYPE=REPORT, CSSURL = http://websrv2/css/report02.css, $ 2. TYPE=DATA, CLASS=Data, $ 3. TYPE=DATA, COLUMN=PRODUCT_ID, CLASS=Sort, $ ENDSTYLE
END
report02.css
4. TD {background:orange; border:0} 5. TABLE {border:0} 6. .Data {font-style:italic; font-family:Arial} 7. .Sort {background:yellow}
This rule inherits background color from the rule for the TD element (line 4).
This rule overrides the default background color specified in line 4.
The procedure displays this report: