Merging Stylesheets

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
pmurphy
Jr. Propeller Head
Posts: 2
Joined: Thu Oct 06, 2016 10:46 am

Merging Stylesheets

Post by pmurphy »

Hey all,

I'm wondering if it is possible to merge two different stylesheets that we have been using for two different types of projects in the name of simplicity and consistency. I have already linked one to the other, but I was wondering if there was a way to 1) merge the two together, 2) strip out all unused styles, 3) add new, more useful styles to this master stylesheet (which we would then put in Global Linking).

Any help is appreciated!

-PM
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Merging Stylesheets

Post by wclass »

We cleaned up and merged our style sheets from a number of different projects some time ago, but it was a manual process. To be honest, though, it wasn't that difficult.

From a basic point of view, yes, you can just copy the contents of one style sheet into another and it will work. Because styles are cascading, though, if you have duplicates this will make it very difficult to maintain. We used an advanced text editor and lots of compares and find/replace to get our styles into the form we wanted. We used UltraEdit, but Notepad++ would work just as well, or any similar tool.

There are some tools and sites out there on the internet that format, optimise and validate CSS files, so you might want to use those as well to make sure the CSS is clean.

Once we completed our merge, we put the CSS file into a global project and we can all incorporate it using global project linking.

Sorry for the late reply - hope the info is still useful.
Margaret Hassall - Melbourne
Joseph Zitt
Propeller Head
Posts: 35
Joined: Sun Mar 10, 2019 3:36 am

Re: Merging Stylesheets

Post by Joseph Zitt »

pmurphy wrote:Hey all,

I'm wondering if it is possible to merge two different stylesheets that we have been using for two different types of projects in the name of simplicity and consistency. I have already linked one to the other, but I was wondering if there was a way to 1) merge the two together, 2) strip out all unused styles, 3) add new, more useful styles to this master stylesheet (which we would then put in Global Linking).

Any help is appreciated!

-PM
I'm facing the same issues, and wondering if anything has changed or been added in the years since then to make this easier. I'm working from two stylesheets with a lot of redundancy, as well as a ton of styles (due to having converted from Word) that are never used. Can I identify and strip out the unused styles and merge the two sheets?
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Merging Stylesheets

Post by Nita Beck »

Joseph Zitt wrote:I'm facing the same issues, and wondering if anything has changed or been added in the years since then to make this easier. I'm working from two stylesheets with a lot of redundancy, as well as a ton of styles (due to having converted from Word) that are never used. Can I identify and strip out the unused styles and merge the two sheets?
There is no automatic way to merge stylesheets. That work you will have to do by hand. But there are ways to determine unused styles and duplicate styles. Use Flare's dynamic Analysis reports:

--Analysis > More Reports > Duplicate Styles Formats
--Analysis > More Reports > Unused Items > Unused Styles

While you're at it, you might also want to run Analysis > Undefined Items > Undefined Styles to find instances in topics and snippets where something has been associated with a class that does not exist in any stylesheet in the project.

HTH
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply