Omni Systems, Inc.


Mif2Go User's Guide, Version 55


Valid HTML 4.01!


Made with Mif2Go

22 Setting up CSS for HTML > 22.7 Assigning CSS classes > 22.7.1 Understanding CSS class name restrictions

22.7.1 Understanding CSS class name restrictions

Use only letters and numbers in class names

Class names used with CSS may contain alphanumeric characters only. You cannot use spaces or symbols; not even underscores. Class names in HTML output must match in case the same names in the CSS file. Mif2Go imposes an internal limit of 128 characters on CSS class names.

To create class names from format names, Mif2Go does the following:

removes or replaces spaces

removes all non-alphanumeric characters

replaces accented characters with their non-accented equivalents; see §21.6.4 Converting Western European accented characters

for output types that require lowercase CSS, changes all characters to lowercase, regardless of whether format names are uppercase, lowercase, or mixed case.

These transformations might lead to conflicts if your format names differ only in spacing, in case, or by any removed characters. See §2.2 Naming FrameMaker formats.

Replace spaces with a character

You can specify a letter, a number, an underscore, or a hyphen to substitute for spaces in class names. For example:


; These alphanumeric chars are used as space replacements in IDs;

; if non-alphanumeric (other than hyphen or underscore), spaces are

; stripped instead (default)

; ClassSpaceChar = char to use as space replacement

ClassSpaceChar = _

Remove spaces

By default, Mif2Go removes spaces without replacing them. The same thing happens if you set ClassSpaceChar to any non-alphanumeric character other than a hyphen or an underscore: Mif2Go removes all spaces without replacing them.

Case of class names

CSS does not distinguish between names that differ only in case; if you use both heading1 and Heading1, and they are defined differently, you are sure to see some unexpected results. Class names in HTML files must match in case the corresponding names in the CSS file. Class names can be mixed case for some output types, but must be lowercase for other output types:

For XML, XHTML, JavaHelp, and Oracle Help, Mif2Go changes all generated class names in output in lowercase.

For standard HTML, HTML Help, and OmniHelp, class names generated from FrameMaker formats retain their original case.

You can force lowercase class names for any HTML output type. To make generated class names all lowercase:


; LowerCaseCSS = No (default mixed case)

;  or Yes (lower case only, JH, OHJ, XML, and XHTML)

LowerCaseCSS = Yes

22 Setting up CSS for HTML > 22.7 Assigning CSS classes > 22.7.1 Understanding CSS class name restrictions