New to CSS--Looking to simplify the style sheet

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Doug Eaton
Propeller Head
Posts: 68
Joined: Tue Feb 19, 2008 9:47 am

New to CSS--Looking to simplify the style sheet

Post by Doug Eaton »

I've been building webhelp using styles adapted from Madcap training and the Flare help system and am ready to build Help interfaces that better match my company's software interfaces. With the help of Charles Wyke-Smith's excellent STYLIN' WITH CSS, I am tentatively editing the style sheet. I would like to delete the tags/styles that I haven't used. Is there a way to generate a list of tags used in a system so that I can begin to sort out what might be safe to delete?

If not, any other advice on how to downsize the number of tags in the stylesheet would be most welcome.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: New to CSS--Looking to simplify the style sheet

Post by KevinDAmery »

One thing to remember is that you can't remove entire tag types from the Flare stylesheet editor. The stylesheet editor shows tags that are part of the W3C standard for XHTML (I don't know if it shows all of them, but certainly a large number) along with a number of tags that are specific to the Madcap DTD - this happens whether the style has actually been specified in your CSS file or not. If the tag doesn't any setting applied in the CSS, the stylesheet editor shows the default values for that tag.

You can remove classes by deleting them from the CSS in a text editor, but the root tags will be shown regardless.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: New to CSS--Looking to simplify the style sheet

Post by LTinker68 »

If you open the stylesheet file (not the editor) in the Internal Text Editor, Notepad, or a similar program, then you'll see the actual styles that have been defined in your stylesheet and will therefore be in the output, although some styles Flare puts in the stylesheet file automatically, like the heading styles.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
MarinaMichaels
Sr. Propeller Head
Posts: 137
Joined: Fri Aug 01, 2008 2:23 am
Location: Northern California
Contact:

Re: New to CSS--Looking to simplify the style sheet

Post by MarinaMichaels »

Wyke-Smith's book is indeed an excellent one. That was a good choice!

As far as deleting styles from your style sheet, as you may have already deduced, that road is fraught with danger. CSS is one of those things that seems clear and easy on the surface, but the deeper you dive, the murkier it gets.

In this case, it is possible that you might delete a style that another style relies on. It isn't even always a good idea to just reorganize the styles in the actual CSS file, because that can have unexpected effects too. And especially since the underlying Flare file format is XML (which I am only just getting to know, though I know XHTML well), then, as a previous poster mentioned, there might be styles that simply must stay there.
QBF
MadCap User
Posts: 40
Joined: Wed Aug 15, 2007 1:22 pm
Location: Minnesota

Re: New to CSS--Looking to simplify the style sheet

Post by QBF »

Doug Eaton wrote:Charles Wyke-Smith's excellent STYLIN' WITH CSS.
I can recommend "Cascading Style Sheets" by Hakon Lie and Bert Bos. These are the guys who created Cascading Style Sheets while working at W3C.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: New to CSS--Looking to simplify the style sheet

Post by LTinker68 »

QBF wrote:I can recommend "Cascading Style Sheets" by Hakon Lie and Bert Bos. These are the guys who created Cascading Style Sheets while working at W3C.
They need to come out with an updated copy, though. The latest version is 3 years old and my local bookstore doesn't carry it. I'll have to order it through Amazon, I guess.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: New to CSS--Looking to simplify the style sheet

Post by NorthEast »

Doug Eaton wrote:I've been building webhelp using styles adapted from Madcap training and the Flare help system and am ready to build Help interfaces that better match my company's software interfaces. With the help of Charles Wyke-Smith's excellent STYLIN' WITH CSS, I am tentatively editing the style sheet. I would like to delete the tags/styles that I haven't used. Is there a way to generate a list of tags used in a system so that I can begin to sort out what might be safe to delete?

If not, any other advice on how to downsize the number of tags in the stylesheet would be most welcome.
If you've made your own stylesheet (i.e. you're not using an existing stylesheet or one from an imported project), then presumably all the styles in your stylesheet are ones that you've added yourself? Is the problem that you can't remember what you use?

If you have MadCap Analyzer, although it doesn't let you check for unused styles, you can check for undefined styles - i.e. you can remove the styles that you think aren't used, and then check to see if any of your topics actually needed them.
Post Reply