Applying Conditions at the Style Level (solved!)

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
ArdisRamey
Propeller Head
Posts: 54
Joined: Wed Sep 05, 2018 9:04 am

Applying Conditions at the Style Level (solved!)

Post by ArdisRamey »

I'm really looking forward to being able to streamline my workflow with Flare's Conditions feature, but I'm having trouble getting Conditions to work.

I've successfully been able to apply my condition ("Show Comments") by highlighting the contents of a <p> paragraph and selecting my condition. BUT this doesn't serve me well for two reasons:
#1: I only want to apply this condition to a specific class of <p> I've defined in my Stylesheet. The class info is only visible from the text editor (which I prefer to work in for this reason) but it appears I'm only able to apply Conditions from the XML editor.

Code: Select all

p.comment
{
	border-left: solid 4px #3498db;
	line-height: 18px;
	background-color: #f0f7fb;
	background-position: 9px 0px;
	background-repeat: no-repeat;
	background-image: url('../Images/Icons/note.png');
	padding-left: 60px;
	padding-right: 60px;
	padding-top: 15px;
	padding-bottom: 15px;
	border-left-style: solid;
	border-left-width: 4px;
	border-left-color: #3498db;
}
#2: I need every <p class="comment"> to have the condition "Show Comments" applied, or my whole house of cards falls over. Applying this by hand is fine for now (though clumsy, see #1) as I only have a small amount of content. But this will quickly become impossible, as my content grows.

How can I apply the condition "Show Comments" automatically to every <p> of the class "comment"?
Last edited by ArdisRamey on Thu Sep 20, 2018 1:51 pm, edited 1 time in total.
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Applying Conditions at the Style Level

Post by Psider »

I think you can add conditions to styles. it's something like mc-condition? I haven't got Flare at the moment, but I'd look in the advanced stylesheet editor showing all properties alphabetically (or under category madcap or other, maybe?)
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: Applying Conditions at the Style Level

Post by NorthEast »

See the help: https://help.madcapsoftware.com/flare20 ... =condition

Flare will automatically add the condition (at build time), and it's overridden by any condition that you manually apply to that tag.
ArdisRamey
Propeller Head
Posts: 54
Joined: Wed Sep 05, 2018 9:04 am

Re: Applying Conditions at the Style Level

Post by ArdisRamey »

I wasn't able to implement this functionality fully until now, but it's exactly what I needed. Thank you for another case closed!
Post Reply