format: prettify entire project
This commit is contained in:
35
node_modules/clean-css/lib/optimizer/level-2/remove-unused-at-rules.js
generated
vendored
35
node_modules/clean-css/lib/optimizer/level-2/remove-unused-at-rules.js
generated
vendored
@ -18,7 +18,12 @@ function normalize(value) {
|
||||
}
|
||||
|
||||
function removeUnusedAtRules(tokens, context) {
|
||||
removeUnusedAtRule(tokens, matchCounterStyle, markCounterStylesAsUsed, context);
|
||||
removeUnusedAtRule(
|
||||
tokens,
|
||||
matchCounterStyle,
|
||||
markCounterStylesAsUsed,
|
||||
context
|
||||
);
|
||||
removeUnusedAtRule(tokens, matchFontFace, markFontFacesAsUsed, context);
|
||||
removeUnusedAtRule(tokens, matchKeyframe, markKeyframesAsUsed, context);
|
||||
removeUnusedAtRule(tokens, matchNamespace, markNamespacesAsUsed, context);
|
||||
@ -71,7 +76,10 @@ function markUsedAtRules(tokens, markCallback, atRules, context) {
|
||||
function matchCounterStyle(token, atRules) {
|
||||
var match;
|
||||
|
||||
if (token[0] == Token.AT_RULE_BLOCK && token[1][0][1].indexOf('@counter-style') === 0) {
|
||||
if (
|
||||
token[0] == Token.AT_RULE_BLOCK &&
|
||||
token[1][0][1].indexOf('@counter-style') === 0
|
||||
) {
|
||||
match = token[1][0][1].split(' ')[1];
|
||||
atRules[match] = atRules[match] || [];
|
||||
atRules[match].push(token);
|
||||
@ -89,7 +97,11 @@ function markCounterStylesAsUsed(atRules) {
|
||||
|
||||
if (property[1][1] == 'list-style') {
|
||||
wrappedProperty = wrapForOptimizing(property);
|
||||
populateComponents([wrappedProperty], context.validator, context.warnings);
|
||||
populateComponents(
|
||||
[wrappedProperty],
|
||||
context.validator,
|
||||
context.warnings
|
||||
);
|
||||
|
||||
if (wrappedProperty.components[0].value[0][1] in atRules) {
|
||||
delete atRules[property[2][1]];
|
||||
@ -138,7 +150,11 @@ function markFontFacesAsUsed(atRules) {
|
||||
|
||||
if (property[1][1] == 'font') {
|
||||
wrappedProperty = wrapForOptimizing(property);
|
||||
populateComponents([wrappedProperty], context.validator, context.warnings);
|
||||
populateComponents(
|
||||
[wrappedProperty],
|
||||
context.validator,
|
||||
context.warnings
|
||||
);
|
||||
component = wrappedProperty.components[6];
|
||||
|
||||
for (j = 0, m = component.value.length; j < m; j++) {
|
||||
@ -188,7 +204,11 @@ function markKeyframesAsUsed(atRules) {
|
||||
|
||||
if (animationRegex.test(property[1][1])) {
|
||||
wrappedProperty = wrapForOptimizing(property);
|
||||
populateComponents([wrappedProperty], context.validator, context.warnings);
|
||||
populateComponents(
|
||||
[wrappedProperty],
|
||||
context.validator,
|
||||
context.warnings
|
||||
);
|
||||
component = wrappedProperty.components[7];
|
||||
|
||||
for (j = 0, m = component.value.length; j < m; j++) {
|
||||
@ -222,7 +242,10 @@ function matchNamespace(token, atRules) {
|
||||
}
|
||||
|
||||
function markNamespacesAsUsed(atRules) {
|
||||
var namespaceRegex = new RegExp(Object.keys(atRules).join('\\\||') + '\\\|', 'g');
|
||||
var namespaceRegex = new RegExp(
|
||||
Object.keys(atRules).join('\\\||') + '\\\|',
|
||||
'g'
|
||||
);
|
||||
|
||||
return function (token) {
|
||||
var match;
|
||||
|
Reference in New Issue
Block a user