Custom numbered list

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Sebastjan
Jr. Propeller Head
Posts: 3
Joined: Mon Dec 14, 2020 7:32 am

Custom numbered list

Post by Sebastjan »

Hello everyone,
My first post ever. I hope I did not break too many forum rules. :P

I am trying to create a custom numbered list (ordered list) with numbers in red circles.
Example:
There are seven continents on Earth:
– North America
– South America
– Europe
...

Attached file shows more details.

Can you help me?

Thank you in advance,
Sebastjan
You do not have the required permissions to view the files attached to this post.
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Custom numbered list

Post by SteveS »

The only control over ordered list numbering is type and value.

Because your numbers are referring to the numbers in a graphic you can create the legend in the graphic as well. That would also have the advantage of keeping the legend with the graphic irrespective of page breaks if you are creating a print version.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Psider
Propellus Maximus
Posts: 902
Joined: Wed Jul 06, 2011 1:32 am

Re: Custom numbered list

Post by Psider »

You can do some fancy stuff with counters, but it's pretty advanced and you'd most likely have to get your hands dirty in code.

I doubt it would convert to print if you need that output.

But here's a link with some examples for the enthusastic among you. :)

https://css-tricks.com/custom-list-number-styling/
Sebastjan
Jr. Propeller Head
Posts: 3
Joined: Mon Dec 14, 2020 7:32 am

Re: Custom numbered list

Post by Sebastjan »

SteveS wrote:The only control over ordered list numbering is type and value.
Because your numbers are referring to the numbers in a graphic you can create the legend in the graphic as well. That would also have the advantage of keeping the legend with the graphic irrespective of page breaks if you are creating a print version.
For a noob like me your reply sounds like a sci-fi. Perhaps after 5 years of using Flare I will get what you wrote. For now I have just created a table, with Wingdings characters for the red circled numbers.
Thank you again for your reply.
Sebastjan
Jr. Propeller Head
Posts: 3
Joined: Mon Dec 14, 2020 7:32 am

Re: Custom numbered list

Post by Sebastjan »

Psider wrote:But here's a link with some examples for the enthusastic among you. :)
https://css-tricks.com/custom-list-number-styling/
It's funny, when I was checking how to do it, I came across the site you mentioned. But with no knowledge of code it was a trial and fail, with a huge emphasis on FAIL.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Custom numbered list

Post by Nita Beck »

Flare does support "custom lists" (although I'm not sure if you can accomplish circled numbers). Learn more here: https://help.madcapsoftware.com/flare20 ... ormats.htm

Note that these work for PDF only, per the documentation.

For one of my clients, we too have circled callout numbers on images. For the corresponding custom list to serve as the legend, I didn't even bother to try to achieve the circles (so don't know one way or another if it's possible), but I styled the numbers as bold, a bit larger than the legend descriptors, and of the same color as the circles on the images. We decided that was sufficient. Now I'll be curious to see if I can make the circles happen! ;)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
DaveMags
Propeller Head
Posts: 33
Joined: Fri Mar 23, 2018 5:53 am
Location: Florida

Re: Custom numbered list

Post by DaveMags »

So, in case someone wants to see it in action, I had to reply because I do almost exactly this in one of my HTML5 projects.

The CSStricks link from Psider above is good for the explanation, so I'll just drop this code here for anyone thinking of trying it out. Note that for this, I use <p> tags for my "list items" in the topics, but I think I did that for a weird reason and you could do the same with regular <li> tags.

So lists in my topic look something like this in the HTML. I apply my "bluenumbercircle" class when I want to use this:

Code: Select all

<ol>
<p class="bluenumbercircle>Text here</p>
<p class="bluenumbercircle>Text here</p>
<p class="bluenumbercircle>Text here</p>
<p class="bluenumbercircle>Text here</p>
</ol>
Then this is in my CSS:

Code: Select all

ol
{
	counter-reset: forcednumbers;
}

/* This sets the correct spacing so that multiple lines indent correctly and it's properly left aligned. */
ol > p.bluenumbercircle
{
	margin-left: -14px;
	text-indent: -26px;
	margin-bottom: 5px;
}

/* Styles the numbers to a blue circle with white text */
ol > p.bluenumbercircle::before
{
	counter-increment: forcednumbers;
	content: counter(forcednumbers);
	background: #06afce;
	border-radius: 50%;
	color: #fff;
	padding-left: 5px;
	padding-right: 5px;
	margin-right: 8px;
}
And it looks like this:
blue circle numbers.png
So there you go. I use it in a few topics. But not much. It was indeed one of the trickier (and in the end, least useful really) custom CSS adds I've done. But it was a fun challenge to work out.
You do not have the required permissions to view the files attached to this post.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Custom numbered list

Post by Nita Beck »

Oooooh, Dave! Very, very cool. 8) Thank you so much for the detailed solution. I'll have to go try this out.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply