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
Merging Stylesheets
-
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: Merging Stylesheets
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.
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
-
- Propeller Head
- Posts: 35
- Joined: Sun Mar 10, 2019 3:36 am
Re: Merging Stylesheets
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?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
-
- Senior Propellus Maximus
- Posts: 3667
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Merging Stylesheets
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: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?
--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
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!