YUI CSS Minifier settings
Inheritance: YuiCommonMinificationSettingsBase
Exemple #1
0
        /// <summary>
        /// Applies a settings to CSS-code compressor
        /// </summary>
        /// <param name="cssCompressor">CSS-code compressor</param>
        /// <param name="cssSettings">Settings of YUI CSS Minifier</param>
        private static void ApplyCssSettingsToCssCompressor(CssCompressor cssCompressor,
                                                            YuiCssMinificationSettings cssSettings)
        {
            ApplyCommonSettingsToCompressor(cssCompressor, cssSettings);

            cssCompressor.RemoveComments = cssSettings.RemoveComments;
        }
Exemple #2
0
        /// <summary>
        /// Applies a CSS settings to original CSS minifier
        /// </summary>
        /// <param name="originalMinifier">Original CSS minifier</param>
        /// <param name="settings">CSS minifier settings</param>
        private static void ApplyCssSettingsToOriginalCssMinifier(CssCompressor originalMinifier,
                                                                  YuiCssMinificationSettings settings)
        {
            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);

            originalMinifier.RemoveComments = settings.RemoveComments;
        }
Exemple #3
0
        /// <summary>
        /// Creates a instance of original CSS minifier
        /// </summary>
        /// <param name="settings">CSS minifier settings</param>
        /// <returns>Instance of original CSS minifier</returns>
        private static CssCompressor CreateOriginalCssMinifierInstance(YuiCssMinificationSettings settings)
        {
            var originalMinifier = new CssCompressor();

            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);
            originalMinifier.RemoveComments = settings.RemoveComments;

            return(originalMinifier);
        }
Exemple #4
0
        /// <summary>
        /// Creates a instance of original CSS minifier
        /// </summary>
        /// <param name="settings">CSS minifier settings</param>
        /// <param name="isInlineCode">Flag for whether to create a settings for inline code</param>
        /// <returns>Instance of original CSS minifier</returns>
        private static CssCompressor CreateOriginalCssMinifierInstance(YuiCssMinificationSettings settings,
                                                                       bool isInlineCode)
        {
            var originalMinifier = new CssCompressor();

            ApplyCssSettingsToOriginalCssMinifier(originalMinifier, settings);
            if (isInlineCode)
            {
                originalMinifier.LineBreakPosition = -1;
            }

            return(originalMinifier);
        }
Exemple #5
0
 /// <summary>
 /// Constructs instance of YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _settings = settings;
 }
 /// <summary>
 /// Creates a instance of YUI CSS Minifier factory
 /// </summary>
 /// <param name="settings">Minification settings used to configure the YUI CSS Minifier</param>
 public YuiCssMinifierFactory(YuiCssMinificationSettings settings)
 {
     MinificationSettings = settings;
 }
Exemple #7
0
 /// <summary>
 /// Constructs an instance of the YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _originalEmbeddedCssMinifier = CreateOriginalCssMinifierInstance(settings, false);
     _originalInlineCssMinifier   = CreateOriginalCssMinifierInstance(settings, true);
 }
 /// <summary>
 /// Constructs an instance of the YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _originalEmbeddedCssMinifier = CreateOriginalCssMinifierInstance(settings, false);
     _originalInlineCssMinifier = CreateOriginalCssMinifierInstance(settings, true);
 }
        /// <summary>
        /// Creates a instance of original CSS minifier
        /// </summary>
        /// <param name="settings">CSS minifier settings</param>
        /// <param name="isInlineCode">Flag for whether to create a settings for inline code</param>
        /// <returns>Instance of original CSS minifier</returns>
        private static CssCompressor CreateOriginalCssMinifierInstance(YuiCssMinificationSettings settings,
			bool isInlineCode)
        {
            var originalMinifier = new CssCompressor();
            ApplyCssSettingsToOriginalCssMinifier(originalMinifier, settings);
            if (isInlineCode)
            {
                originalMinifier.LineBreakPosition = -1;
            }

            return originalMinifier;
        }
        /// <summary>
        /// Applies a CSS settings to original CSS minifier
        /// </summary>
        /// <param name="originalMinifier">Original CSS minifier</param>
        /// <param name="settings">CSS minifier settings</param>
        private static void ApplyCssSettingsToOriginalCssMinifier(CssCompressor originalMinifier,
			YuiCssMinificationSettings settings)
        {
            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);

            originalMinifier.RemoveComments = settings.RemoveComments;
        }
 /// <summary>
 /// Constructs instance of YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _settings = settings;
 }
        /// <summary>
        /// Applies a settings to CSS-code compressor
        /// </summary>
        /// <param name="cssCompressor">CSS-code compressor</param>
        /// <param name="cssSettings">Settings of YUI CSS Minifier</param>
        private static void ApplyCssSettingsToCssCompressor(CssCompressor cssCompressor,
			YuiCssMinificationSettings cssSettings)
        {
            ApplyCommonSettingsToCompressor(cssCompressor, cssSettings);

            cssCompressor.RemoveComments = cssSettings.RemoveComments;
        }
 /// <summary>
 /// Creates a instance of YUI CSS Minifier factory
 /// </summary>
 /// <param name="settings">Minification settings used to configure the YUI CSS Minifier</param>
 public YuiCssMinifierFactory(YuiCssMinificationSettings settings)
 {
     MinificationSettings = settings;
 }