Swapping stylesheet mediums

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
todd.richardson
Sr. Propeller Head
Posts: 184
Joined: Thu Aug 07, 2008 6:43 am
Location: Massachusetts

Swapping stylesheet mediums

Post by todd.richardson »

Hello,

In our current stylesheet, styles in the default medium use the Arial font and those in the print medium use Verdana. Our corporate office, however, has recently decided to reverse these - they want Arial used in printed output and Verdana in electronic output. Before I begin the laborious task of manually changing the 50+ styles in each medium, I wanted to inquire if there is a way to simply swap the two mediums (print becomes default and vice-versa). Can this be done? If so, how?

Thanks in advance.
Todd Richardson
Engineering Team Lead – Customer Experience | IntervalZero

Windows 10, Flare 2020
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Swapping stylesheet mediums

Post by LTinker68 »

You could swap them, but I wouldn't necessarily recommend it (see the Note below). Make a copy of the stylesheet first, just to be safe.

Swapping the mediums: Open the stylesheet in the Internal Text Editor. Scroll down until you find the part that starts with @media print. Copy that entire section (making sure you get the opening and closing braces), delete it from that location, then paste it at the top of the stylesheet editor. Once it's pasted there, copy the @media print line and the opening brace that's probably located on the next line, delete them from that location, scroll down to after the closing brace, and paste them before the first (default) tag, which is probably the body tag. Delete the closing brace of the previous @media print section, then jump to the end of the stylesheet file and add it again. Save the stylesheet.

You have just swapped the default and print mediums in the stylesheet.

NOTE: Generally speaking, you're going to have more styles in the default medium than in the print medium because you really only need to specify styles in the print medium if the way they're defined in the default medium isn't desirable. Especially if there are styles you'll only use for the online output (togglers, for instance). Theoretically, you should only have to specify a font family in one location -- the body tag. However, Flare has apparently hard-coded some default fonts for some tags so in a few cases you might have to respecify the font family. Either way, there shouldn't be that many tags where you specified a font family, so it might just be easier to go through the stylesheet in the Internal Text Editor and replace the fonts on the tags where they're specified.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
todd.richardson
Sr. Propeller Head
Posts: 184
Joined: Thu Aug 07, 2008 6:43 am
Location: Massachusetts

Re: Swapping stylesheet mediums

Post by todd.richardson »

Thanks Lisa.
Todd Richardson
Engineering Team Lead – Customer Experience | IntervalZero

Windows 10, Flare 2020
Post Reply