Generic Selectors not working

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Flare00
Propeller Head
Posts: 13
Joined: Thu Dec 21, 2017 7:46 am

Generic Selectors not working

Post by Flare00 »

Hello,
I am using Flare 2019
I am having an issue with generic selectors (e.g. Center) I can create them but when I try to apply it to another tag such as p.H1 and it will not apply correctly.

I have watched this video https://www.youtube.com/watch?v=DagR14UOTYU (see 24 minute mark) and it seems simple enough and followed all the steps in the video. As example I apply the generic selector to my H1 and it centers it but changes the style to like my p.body tag (I think) basically reformats it

Has anyone had this issue? Are there conditions where Generics can/can’t be used? or style sheet protocol I'm missing?

Maybe someone can post some FLARE HTML code that shows what a sample tag looks like with a generic selector attached to it looks like, maybe I can test with it and work around it modifying the code in the stylesheet editor.

Thanks in advance!
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Generic Selectors not working

Post by Chicago_HPT »

In the CSS text file, the first character of a generic class is a period. For example, I have a generic style to hide the formatted content. Here is what it looks like in my CSS file.

Code: Select all

.hidden	/*Content that does not display (is effectively removed at runtime)*/
{
	display: none;
}
So, in the HTML, I can add it to any element. For a span tag, it would be used like this:

Code: Select all

<p>This paragraph includes a hidden element <span class="hidden">(this one)</span> that does not display when rendered.</p>
I hope that helps,
-jeff
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Generic Selectors not working

Post by NorthEast »

Flare00 wrote:I am having an issue with generic selectors (e.g. Center) I can create them but when I try to apply it to another tag such as p.H1 and it will not apply correctly.
That's because Flare's interface only allows you to apply one class to a tag. If the tag already has the class p.H1, and you apply the .Center class from the styles list, then Flare will change the tag's class from p.H1 to p.Center.
So it's not a problem with using a generic class, as you just can't apply two (or more) classes in Flare - whether they're generic or not.

If you want a tag to have two classes, then you have to manually enter them in the Text Editor mode, for example:

Code: Select all

<p class="H1 Center">
You could also put in a feature request to MadCap, as you really should be able to apply more than one class.
Post Reply