Copy link to clipboard
Copied
Hi
I have a file with lots of paragraph styles and character styles. After exporting it as HTML, I got the following error message:
HTML export warning(s)
The file was exported but one or more problems were detected:
CSS name collision : 26 detected
The names of the various paragraph styles are unique, and I have not used any special characters in them. Some of the names that were detected in the warning message differ only very slightly, the only difference being a punctuation character or a space, for example:
; a1 [that is, semicolon, space, space, a1]
;' a1 [that is, semicolon, apostrophe, space, a1]
So in order to make sure there are no conflicts, what characters should not be used in style names? What exactly are the limitations?
For best results, I avoid any unique characters as well as spaces in my InDesign style names when exporting to HTML from InDesign.
Copy link to clipboard
Copied
Hi samar1234 ,
see the following discussion:
Which characters are valid in CSS class names/selectors? - Stack Overflow
Regards,
Uwe
Copy link to clipboard
Copied
Thanks, Uwe. I'm note sure I understand the definition found there: "only the characters [a-z0-9] and ISO 10646 characters U+00A1 and higher" – doesn't this mean that basically every character is allowed?
Copy link to clipboard
Copied
There could also be a different depth to the problem with style names:
Check what InDesign does with a specific style name after export to HTML.
Maybe some conversions are done.
Regards,
Uwe
Copy link to clipboard
Copied
Correct, in the HTML version some characters in the style names have indeed been converted to a hyphen. As far as I can see this holds true for the apostrophe (U+0027) and for the space character (U+0020).
Copy link to clipboard
Copied
For best results, I avoid any unique characters as well as spaces in my InDesign style names when exporting to HTML from InDesign.
Copy link to clipboard
Copied
Thanks, Chad. I had not been aware that spaces can cause problems – now I'll stop using them in style names!
Copy link to clipboard
Copied
I think most browsers handle it pretty well however spaces get converted to %20 in the HTML/CSS. I just find it cleaner and more predictable when I avoid using spaces 😉
Find more inspiration, events, and resources on the new Adobe Community
Explore Now