How to apply complex selectors

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
fchan
Propeller Head
Posts: 47
Joined: Fri Aug 31, 2012 11:41 am

How to apply complex selectors

Post by fchan »

I've read about complex selectors and about how to define them. But I can't figure out how to apply them. For example, if I want to apply the "ol ol" complex selector that's pre-defined in Flare, what do I do? I can't get the complex selector to appear in the list of styles that I can choose from. As a result, I don't know how to associate this complex selector with the paragraph(s) that should take on the appearance of the nested lists.

Thanks!
sfoley
Propeller Head
Posts: 92
Joined: Mon May 05, 2008 5:00 pm

Re: How to apply complex selectors

Post by sfoley »

fchan wrote:I've read about complex selectors and about how to define them. But I can't figure out how to apply them. For example, if I want to apply the "ol ol" complex selector that's pre-defined in Flare, what do I do? I can't get the complex selector to appear in the list of styles that I can choose from. As a result, I don't know how to associate this complex selector with the paragraph(s) that should take on the appearance of the nested lists.
You can't assign complex selectors to an arbitrary bit of content. The complex selector simply takes effect when its conditions match the element structure.

In the example you described, ol ol, you need to have two ordered lists, one nested inside the other. You can't just select this style and apply it to any paragraph. Instead, you'd need to create the structure that matches the selector:

Code: Select all

<ol>
    <li>Bullet list item 1
        <ol>
            <li>Nested list item 1</li>
        </ol>
    </li>
</ol>
To do this in Flare's WYSINWYG editor, create a new list item and press Tab.

If all you want is to mimic the indentation and bullet with a paragraph, then you can just create a new class. Set the left margin, padding, and list-style-type properties and you're set. (This won't work very well for ordered lists; you'd need to use Flare's mc-auto-number properties to make that work.)
fchan
Propeller Head
Posts: 47
Joined: Fri Aug 31, 2012 11:41 am

Re: How to apply complex selectors

Post by fchan »

Thanks. I got it now. If you have a structure that matches a complex selector, the appearance defined for that complex selector will take effect for that structure. You don't need to "apply" it as you would a style.
Post Reply