styles ?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Jan Jursa
Propeller Head
Posts: 32
Joined: Tue Jan 20, 2009 2:03 am

styles ?

Post by Jan Jursa »

What's the best way to work with Styles in Flare?
When I open /Stylesheets/Styles.css with an external CSS editor, there seem to be many styles missing in that file (can't find classes like TocEntry_TocEntry for example).

But working with the internal Stylesheet editor seems very, very cumbersome.
What's the best way to get things done for css pros?

Cheers.
carolynmwallace
Sr. Propeller Head
Posts: 168
Joined: Thu Jan 31, 2008 12:21 pm
Location: Durham, NC

Re: styles ?

Post by carolynmwallace »

What seems to be happening (at least in my experience) is that Flare doesn't put default styles like TocEntry_TocEntry in your CSS file UNLESS you make a change to them in the Stylesheet Editor. Once you do, you can then open the revised CSS file in the editor of your choice, find the style, and make additional changes.

Yeah, not very helpful. Sorry!
Jan Jursa
Propeller Head
Posts: 32
Joined: Tue Jan 20, 2009 2:03 am

Re: styles ?

Post by Jan Jursa »

Ah, ok :) Thx a lot.
Is there a way to search for css classes or IDs by name?

Can't find no search....

Thanx.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: styles ?

Post by LTinker68 »

When you build WebHelp, CHM, or DotNetHelp output, a second stylesheet call is added to your topics at build time. This stylesheet is called MadCap.css. It contains all of the default styles for the Flare-specific styles, like the TocEntry. If you don't specify a style for a tag (any tag), then the style from the MadCap.css stylesheet -- if it's specified in that stylesheet -- will be used. If it's not defined in that stylesheet, then it'll use the browser's default style for that tag.

There are two ways you can specify styles in Flare (I'm not counting table stylesheets for this). The first one is your main topic stylesheet(s). The second one is the skin file. Anything related to the skin (i.e., the frameset) is in the skin stylesheet. Anything related to the appearance of the content (i.e., the topics) is in the main topic stylesheets.

I'm somewhat familiar with stylesheets, so I always have the Stylesheet Editor set to Advanced view and "Show: Property Groups" and "Show all styles" (or however it's worded). That way I see all of the possible styles available. But as Carolyn explained, styles in the Stylesheet Editor aren't added to the topic stylesheet file until you modify the style in the Stylesheet Editor. Or add it to the file manually. And there are some bugs in the Stylesheet Editor where it displays values for properties that you never set and that aren't defined in the topic stylesheet.

So if you're ever wondering if a style has been defined, open the main topic stylesheet in the Internal Text Editor or Notepad. If it's not there, it's not defined. Unfortunately, there's not an easy way to do the same with the skin styles, but at least in the skin, there doesn't appear to be any extraneous or misleading properties displayed, so what you defined is what is used.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: styles ?

Post by LTinker68 »

Jan Jursa wrote:Is there a way to search for css classes or IDs by name?
There won't be any IDs in the main topic stylesheet unless you add them yourself manually. Any IDs you may be looking for are in the MadCap.css stylesheet, which you can't edit directly.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Jan Jursa
Propeller Head
Posts: 32
Joined: Tue Jan 20, 2009 2:03 am

Re: styles ?

Post by Jan Jursa »

Thanx a lot Lisa :-)
Great info.

Jan
Post Reply