How does Flare "know" that P follows Hn?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

How does Flare "know" that P follows Hn?

Post by Phlawm53 »

For Flare 11, although this isn't a version specific question.

■In the Flare XML Editor, IF i insert a heading element (H1-6) then press ENTER, THEN Flare automatically creates a P (for paragraph) element.

QUESTION: What mechanism controls that behavior? I'm merely curious in a "just for fun" way, at least for now.

■ Also, would it be possible to modify that behavior so that after a heading element a paragraph of a certain CSS class was automatically created instead? I don't need/want to do this, just wondering.

Cheers & thanks,
Riley
SFO
Last edited by Phlawm53 on Thu Sep 08, 2016 10:48 am, edited 2 times in total.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: How does Flare "know" that P follows Hn?

Post by Nita Beck »

Riley, I have no idea how Flare "knows" to follow a heading with a plain p. But I do know how you can make one style always be followed by another style of a given class.

Say you always want an h2 to be followed by a p.Note paragraph. (I won't question why you might want this behavior! :))

You'd set your CSS like this:

Code: Select all

h2{
	mc-next-tag: p;
	mc-next-class: Note;
}
Be forewarned that it's not possible to set just the next "tag" (meaning the base style). You've got to declare what specific class you want.

HTH
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: How does Flare "know" that P follows Hn?

Post by Phlawm53 »

Thanks Nita!

I hadn't come across the mc-next-tag and mc-next-class attributes. Handy to know 'bout those, and how they need to be used together, for "someday", maybe.

Now that I know about those, it would not surprise me to learn that Flare's built-in style sheet has default values for them. Say for what style automatically follows Hn...

Cheers & thanks 'gain,
Riley
SFO
Post Reply