/// <summary> /// Makes the appropriate CSS ID name for the sprite to be used. /// </summary> /// <param name="pathToImage">The path to the image</param> /// <param name="pathToSpriteDirectory">The path to the directory used to store sprites, used if the path to the image was not relative to the sprites directory</param> /// <returns>The CSS class used to reference the optimized image</returns> public string MakeCssClassName(string pathToImage, string pathToSpriteDirectory = null) { if (pathToImage == null) { throw new ArgumentNullException("pathToImage"); } string cssFilename = TrimPathForCss(pathToImage, pathToSpriteDirectory); return(CssNameHelper.GenerateClassName(cssFilename)); }
internal string MakeCssSelector(string pathToImage, string pathToSpriteDirectory = null) { string cssFilename = TrimPathForCss(pathToImage, pathToSpriteDirectory); return(CssNameHelper.GenerateSelector(cssFilename)); }