Search code examples
adobebusiness-catalyst

Minify CSS Business Catalyst


I've been given the task of taking over a business catalyst site. I'm not familiar with how BC handles it stylesheets. I'm seeing a style sheet for items like the menu, random elements, etc.. My task is to minify all these sheets into a single .min sheet. I can add these into my gulp workflow as is and be good, however, I'm not certain how these style sheets are being called. Is there a function file that handles who these stylesheets get used by? Do I need to change the template files?

Thanks and I really appreciate the help


Solution

  • By default Adode BC adds a link to a "StyleSheets/ModuleStyleSheets.css".

    ModuleStyleSheets.css contains styling for the out-of-the-box modules and layouts that BC uses.

    There is an option in BC Page Templates called "No HEAD elements" that will disable the inclusion of the module stylesheet, along with all other BC scripts. Most likely this has been left unchecked as it very complex to replicate all of the javascripts that come with Adobe BC.

    Beyond ModuleStyleSheets.css; Adobe BC is a blank canvas for styles. They can be linked to anywhere there is a "<head>" section; from page templates, pages, module layouts.

    Consider a "Page" using a "Page Template" with a module on it. If the PAGE, PAGE TEMPLATE and MODULES each have a "<head>" in their HTML; the final result is the merging together of all the individual "<head>" sections.

    You'd probably be best to start looking in the "Page Templates" first, if there are no page templates; then look in "Pages" for the stylesheet links.