-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Consider a media query of the form @media (width < 250px) or (height < 500px). When minifying this, the error Expected closing parenthesis, found '<' is reported. However, this media query is valid according to this section on the MDN.
For example, the following code produces this error:
<html>
<head>
<style>
@media (width < 250px) or (height < 500px)
{
body
{
background-color: red;
}
}
</style>
</head>
<body>
Test
</body>
</html>The stacktrace is as follows:
at WebMarkupMin.Core.GenericHtmlMinifier.WriteError(String category, String message, String filePath, Int32 lineNumber, Int32 columnNumber, String sourceFragment)
at WebMarkupMin.Core.GenericHtmlMinifier.ProcessEmbeddedStyleContent(MarkupParsingContext context, String content, String contentType)
at WebMarkupMin.Core.GenericHtmlMinifier.EmbeddedCodeHandler(MarkupParsingContext context, String code)
at WebMarkupMin.Core.Parsers.HtmlParser.ProcessEmbeddedCode()
at WebMarkupMin.Core.Parsers.HtmlParser.Parse(String content)
at WebMarkupMin.Core.GenericHtmlMinifier.Minify(String content, String fileContext, Encoding encoding, Boolean generateStatistics)
The used settings are as follows:
options.CssMinifierFactory = new NUglifyCssMinifierFactory(new NUglifyCssMinificationSettings
{
AbbreviateHexColor = true,
BlocksStartOnSameLine = BlockStart.SameLine,
ColorNames = CssColor.Hex,
CommentMode = CssComment.None,
DecodeEscapes = false,
IgnoreAllErrors = false,
IgnoreErrorList = string.Join(',',
CssMinificationIgnoreErrors.Select(e => $@"CSS{(int)e}")),
IndentSize = 0,
IndentType = IndentType.Tab,
LineBreakThreshold = int.MaxValue,
MinifyExpressions = true,
OutputMode = OutputMode.SingleLine,
RemoveEmptyBlocks = true,
TermSemicolons = false,
WarningLevel = int.MaxValue
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels