#set ($prefix = $webResourceManager.getSpaceCssPrefix($spaceKey))
#set ($globalPrefix = $webResourceManager.globalCssResourcePrefix)

#if ($theme.includeClassicStyles)
    ##for plugins using classic theme stylesheet (i.e. pre 2.6)
    @import url('$globalPrefix/includes/css/site-2.5.css');
#end

#if ($forWysiwyg)
    ## we have to manually include all the styles for wysiwyg editing as we can't use
    ## the webResourceManager.getResources here
    #foreach ($resourceUrl in $wysiwygResourceUrls)
        @import url('$resourceUrl');
    #end
#end

@import url('$prefix/styles/colors.css?spaceKey=$!spaceKey');

#foreach ($stylesheet in $theme.stylesheets)
    /* Including stylesheet $stylesheet */

    #if ($stylesheet.location.endsWith('.vm'))
        @import url('$prefix/styles/theme-colors.css?completeModuleKey=$!generalUtil.htmlEncode($stylesheet.completeModuleKey)&stylesheetName=$!generalUtil.htmlEncode($stylesheet.name)&spaceKey=$!generalUtil.htmlEncode($spaceKey)');
    #else
        @import url('$!webResourceManager.getStaticPluginResource($stylesheet.completeModuleKey, $stylesheet.name)');
    #end
#end

@import url('$prefix/styles/custom.css?spaceKey=$!spaceKey');
