clean-css
Advanced tools
Comparing version 5.3.1 to 5.3.2
@@ -57,3 +57,3 @@ var shortenHex = require('./color/shorten-hex'); | ||
|| (colorFnLowercase == 'rgb' && tokens.length === 3 && colorDef.indexOf('%') > 0) | ||
|| (colorFnLowercase == 'rgba' && tokens.length == 4 && colorDef.indexOf('%') > 0); | ||
|| (colorFnLowercase == 'rgba' && tokens.length == 4 && tokens[0].indexOf('%') > 0); | ||
@@ -60,0 +60,0 @@ if (!applies) { |
@@ -14,14 +14,14 @@ var split = require('../utils/split'); | ||
var mediaQuery; | ||
var stripped; | ||
var normalized; | ||
var parts; | ||
stripped = atRuleValue | ||
normalized = atRuleValue | ||
.replace(IMPORT_PREFIX_PATTERN, '') | ||
.trim() | ||
.replace(URL_PREFIX_PATTERN, '(') | ||
.replace(URL_SUFFIX_PATTERN, ')') | ||
.replace(URL_SUFFIX_PATTERN, ') ') | ||
.replace(QUOTE_PREFIX_PATTERN, '') | ||
.replace(QUOTE_SUFFIX_PATTERN, ''); | ||
parts = split(stripped, ' '); | ||
parts = split(normalized, ' '); | ||
@@ -28,0 +28,0 @@ uri = parts[0] |
@@ -122,5 +122,9 @@ var fs = require('fs'); | ||
return fs.readFileSync(absoluteUri, 'utf8'); | ||
var result = fs.readFileSync(absoluteUri, 'utf8'); | ||
if (result.charCodeAt(0) === 65279) { | ||
result = result.substring(1); | ||
} | ||
return result; | ||
} | ||
module.exports = loadOriginalSources; |
@@ -311,2 +311,6 @@ var fs = require('fs'); | ||
if (importedStyles.charCodeAt(0) === 65279) { | ||
importedStyles = importedStyles.substring(1); | ||
} | ||
inlinerContext.inlinedStylesheets.push(absoluteUri); | ||
@@ -313,0 +317,0 @@ inlinerContext.inline = inlinerContext.externalContext.options.inline; |
@@ -28,3 +28,5 @@ var Marker = require('./marker'); | ||
'@media', | ||
'@supports' | ||
'@supports', | ||
'@container', | ||
'@layer' | ||
]; | ||
@@ -137,3 +139,3 @@ | ||
characterWithNoSpecialMeaning = !isSpace && !isCarriageReturn && (character >= 'A' && character <= 'Z' || character >= 'a' && character <= 'z' || character >= '0' && character <= '9' || character == '-'); | ||
isVariable = isVariable || (level != Level.COMMENT && !seekingValue && isPreviousDash && character === '-'); | ||
isVariable = isVariable || (level != Level.COMMENT && !seekingValue && isPreviousDash && character === '-' && buffer.length === 1); | ||
isPreviousDash = character === '-'; | ||
@@ -140,0 +142,0 @@ roundBracketLevel = Math.max(roundBracketLevel, 0); |
{ | ||
"name": "clean-css", | ||
"version": "5.3.1", | ||
"version": "5.3.2", | ||
"author": "Jakub Pawlowicz <contact@jakubpawlowicz.com>", | ||
@@ -5,0 +5,0 @@ "description": "A well-tested CSS minifier", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
492396
10636