Applying Bullet style produces strange HTML

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
sparklyfirefly
Propeller Head
Posts: 20
Joined: Thu Apr 14, 2016 1:42 am

Applying Bullet style produces strange HTML

Post by sparklyfirefly »

Hi all

I'm fairly new to Flare and have the following problem with a bullet style. We have inherited a template from a colleague which uses a bullet style instead of the li option.
I have two issues.

Issue 1 : When I apply the ListBullet style, I get code like this:

<p class="ListBullet" MadCap:autonum="<span style="color: Black;" class="mcFormatColor"> <span style="font-family: 'Wingdings';" class="mcFormatFamily">Ÿ</span></span>"><a href="Adding_Images.htm">Adding images</a>

Instead of this: <p class="ListBullet"><a href="Adding_Images.htm">Adding images</a>

Does anyone know what might cause this?

Issue 2: Bullets appear ok in both web and print output, but in the Flare interface they appear as a clock followed by a tall rectangle. OK, so we could continue using this, but it's annoying that they don't display properly. Does anyone know why this might be? The style set for the bullets is Wingdings, which we do have in our Flare project.

CSS for the ListBullet style is attached.
listbullet style.png
Many thanks for any help
Laura
You do not have the required permissions to view the files attached to this post.
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Applying Bullet style produces strange HTML

Post by robdocsmith »

Well... Setting aside the obvious question as to why you'd use a paragraph to represent a bullet in such a convoluted way...

The autonum declaration is trying to put the following before your link:

Code: Select all

<span style="color: Black;" class="mcFormatColor"> <span style="font-family: 'Wingdings';" class="mcFormatFamily">Ÿ</span></span>
Issue 1

When a style is applied that includes an autonum declaration in the style, it gets copied into the page's HTML. This can be ignored, though it does look a little messy sometimes. For example, I have a FigureCaption style that includes an autonumber definition:

Code: Select all

mc-auto-number-format: 'CF:Figure {chapnum}-{n+}   ';
and get the following in my HTML when I apply the style.

Code: Select all

<p class="FigureCaption" MadCap:autonum="Figure 1-1   ">The text of the caption</p>
Every caption is numbered 1-1 as above in the Editor, though when the output is generated, the numbers are displayed correctly.

Issue 2

The Symbols Ÿ in Wingdings font are exactly as appear in your XML Editor view, a clock and a rectangle (undisplayable character). The Ÿ (ascii code 159) should equate to a bullet character but seems it's unable to be viewed in the XML editor. I've seen online the some characters between codes 128 and 159 may not be displayed correctly in some interfaces even though the character is in the font. When you go to output the file the styles are resolved correctly and your bullet is displayed.

I'm guessing you've defined the bullet in this way because you want two characters instead of the usual 1 to represent each bullet? That's my guess anyway. I'd be more inclined to create a glyph as an image that covers whatever bullet you are trying to display. Then all you need to do is apply that image to the list:

Code: Select all

ul
{
	list-style-image: url('../Images/yourBulletImage.png');
}
Or if you wanted to use various images of bullets in a single list you could set the UL to have no bullet type and then set the bullet using a class of the LI element:

Code: Select all

ul {
list-style-type: none;
}
li.styleOne {
background: url('../images/bulletImageOne.png') no-repeat left top;
}
li.styleTwo {
background: url('../images/bulletImageTwo.png') no-repeat left top;
}
Then add a list as follows:

Code: Select all

<ul>
<li class="styleOne">first bullet</li>
<li class="styleTwo">second bullet</li>
</ul>
This would keep your HTML and CSS easier to read and simpler to update the bullet image when necessary.

Hope that helps,

Rob
sparklyfirefly
Propeller Head
Posts: 20
Joined: Thu Apr 14, 2016 1:42 am

Re: Applying Bullet style produces strange HTML

Post by sparklyfirefly »

Thanks for taking the time to reply to this Rob.
Post Reply