### 22.8.4 Overriding styles in Mif2Go-generated CSS files

When you direct Mif2Go to generate a CSS file anew each time (that is, when [CSS]WriteCssStylesheet=Always), styles are updated from the formats in your FrameMaker document, and anything you added directly to the CSS file is lost. However, you can include settings in the configuration file to modify the generated CSS file. With these settings you can do any or all of the following:

Override CSS code | Replace generated CSS code with fixed CSS code for selected formats.
Omit CSS code | Prevent CSS code from being written to the CSS file for selected formats.
Add CSS code | Add code to the beginning or the end of the generated CSS file.

See also:

§22.8.2 Specifying CSS <body> tag properties

§22.8.3 Specifying CSS size values and units of measurement

Override CSS code

To override the style specification in a Mif2Go-generated CSS file for a particular FrameMaker format, assign a property to the format, and optionally provide replacement code for the style. For example:

[HtmlStyles]

; CSSReplace uses [StyleCSS] to specify on a single line

; the code to be written to the .css for the format when

; [HtmlOptions]WriteCssStylesheet = Always or Once

; NoCSS suppresses writing info to the .css file for its format.

SomeFmt=CSSReplace

OtherFmt=NoCSS

When you assign property CSSReplace to a format, you must also specify replacement CSS code for that format in section [StyleCSS]. The code assignment must be all on one line. For example:

[StyleCSS]

SomeFmt=p.somefmt {font: bold 12pt/14pt sans-serif}

Omit CSS code

When you assign property NoCSS to a format, Mif2Go still generates the class attributes in the HTML, but does not include them in the CSS file.

Add CSS code

To add starting and ending code to a generated CSS file:

[CSSStartMacro]

; CSS code to be inserted at the start of the .css file if generated

[CSSEndMacro]

; CSS code to be inserted at the end of the .css file if generated

You can use these macro configuration sections to add more CSS entries, perhaps with selectors Mif2Go does not use; or add CSS code for positioning, or to set anchor properties, or <body> properties, or special properties for nested items.

| 22.8.3 Specifying CSS size values and units of measurement |  | 22.8.5 Adjusting leading (line spacing) in CSS |