Edit File by line
/home/barbar84/www/wp-inclu.../js/codemirr...
File: csslint.js
}
[8500] Fix | Delete
compatiblePrefixes[prop] = variations;
[8501] Fix | Delete
arrayPush.apply(applyTo, variations);
[8502] Fix | Delete
}
[8503] Fix | Delete
}
[8504] Fix | Delete
[8505] Fix | Delete
parser.addListener("startrule", function () {
[8506] Fix | Delete
properties = [];
[8507] Fix | Delete
});
[8508] Fix | Delete
[8509] Fix | Delete
parser.addListener("startkeyframes", function (event) {
[8510] Fix | Delete
inKeyFrame = event.prefix || true;
[8511] Fix | Delete
});
[8512] Fix | Delete
[8513] Fix | Delete
parser.addListener("endkeyframes", function () {
[8514] Fix | Delete
inKeyFrame = false;
[8515] Fix | Delete
});
[8516] Fix | Delete
[8517] Fix | Delete
parser.addListener("property", function (event) {
[8518] Fix | Delete
var name = event.property;
[8519] Fix | Delete
if (CSSLint.Util.indexOf(applyTo, name.text) > -1) {
[8520] Fix | Delete
[8521] Fix | Delete
// e.g., -moz-transform is okay to be alone in @-moz-keyframes
[8522] Fix | Delete
if (!inKeyFrame || typeof inKeyFrame !== "string" ||
[8523] Fix | Delete
name.text.indexOf("-" + inKeyFrame + "-") !== 0) {
[8524] Fix | Delete
properties.push(name);
[8525] Fix | Delete
}
[8526] Fix | Delete
}
[8527] Fix | Delete
});
[8528] Fix | Delete
[8529] Fix | Delete
parser.addListener("endrule", function () {
[8530] Fix | Delete
if (!properties.length) {
[8531] Fix | Delete
return;
[8532] Fix | Delete
}
[8533] Fix | Delete
[8534] Fix | Delete
var propertyGroups = {},
[8535] Fix | Delete
i,
[8536] Fix | Delete
len,
[8537] Fix | Delete
name,
[8538] Fix | Delete
prop,
[8539] Fix | Delete
variations,
[8540] Fix | Delete
value,
[8541] Fix | Delete
full,
[8542] Fix | Delete
actual,
[8543] Fix | Delete
item,
[8544] Fix | Delete
propertiesSpecified;
[8545] Fix | Delete
[8546] Fix | Delete
for (i = 0, len = properties.length; i < len; i++) {
[8547] Fix | Delete
name = properties[i];
[8548] Fix | Delete
[8549] Fix | Delete
for (prop in compatiblePrefixes) {
[8550] Fix | Delete
if (compatiblePrefixes.hasOwnProperty(prop)) {
[8551] Fix | Delete
variations = compatiblePrefixes[prop];
[8552] Fix | Delete
if (CSSLint.Util.indexOf(variations, name.text) > -1) {
[8553] Fix | Delete
if (!propertyGroups[prop]) {
[8554] Fix | Delete
propertyGroups[prop] = {
[8555] Fix | Delete
full: variations.slice(0),
[8556] Fix | Delete
actual: [],
[8557] Fix | Delete
actualNodes: []
[8558] Fix | Delete
};
[8559] Fix | Delete
}
[8560] Fix | Delete
if (CSSLint.Util.indexOf(propertyGroups[prop].actual, name.text) === -1) {
[8561] Fix | Delete
propertyGroups[prop].actual.push(name.text);
[8562] Fix | Delete
propertyGroups[prop].actualNodes.push(name);
[8563] Fix | Delete
}
[8564] Fix | Delete
}
[8565] Fix | Delete
}
[8566] Fix | Delete
}
[8567] Fix | Delete
}
[8568] Fix | Delete
[8569] Fix | Delete
for (prop in propertyGroups) {
[8570] Fix | Delete
if (propertyGroups.hasOwnProperty(prop)) {
[8571] Fix | Delete
value = propertyGroups[prop];
[8572] Fix | Delete
full = value.full;
[8573] Fix | Delete
actual = value.actual;
[8574] Fix | Delete
[8575] Fix | Delete
if (full.length > actual.length) {
[8576] Fix | Delete
for (i = 0, len = full.length; i < len; i++) {
[8577] Fix | Delete
item = full[i];
[8578] Fix | Delete
if (CSSLint.Util.indexOf(actual, item) === -1) {
[8579] Fix | Delete
propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length === 2) ? actual.join(" and ") : actual.join(", ");
[8580] Fix | Delete
reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
[8581] Fix | Delete
}
[8582] Fix | Delete
}
[8583] Fix | Delete
[8584] Fix | Delete
}
[8585] Fix | Delete
}
[8586] Fix | Delete
}
[8587] Fix | Delete
});
[8588] Fix | Delete
}
[8589] Fix | Delete
});
[8590] Fix | Delete
[8591] Fix | Delete
/*
[8592] Fix | Delete
* Rule: Certain properties don't play well with certain display values.
[8593] Fix | Delete
* - float should not be used with inline-block
[8594] Fix | Delete
* - height, width, margin-top, margin-bottom, float should not be used with inline
[8595] Fix | Delete
* - vertical-align should not be used with block
[8596] Fix | Delete
* - margin, float should not be used with table-*
[8597] Fix | Delete
*/
[8598] Fix | Delete
[8599] Fix | Delete
CSSLint.addRule({
[8600] Fix | Delete
[8601] Fix | Delete
// rule information
[8602] Fix | Delete
id: "display-property-grouping",
[8603] Fix | Delete
name: "Require properties appropriate for display",
[8604] Fix | Delete
desc: "Certain properties shouldn't be used with certain display property values.",
[8605] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Require-properties-appropriate-for-display",
[8606] Fix | Delete
browsers: "All",
[8607] Fix | Delete
[8608] Fix | Delete
// initialization
[8609] Fix | Delete
init: function(parser, reporter) {
[8610] Fix | Delete
"use strict";
[8611] Fix | Delete
var rule = this;
[8612] Fix | Delete
[8613] Fix | Delete
var propertiesToCheck = {
[8614] Fix | Delete
display: 1,
[8615] Fix | Delete
"float": "none",
[8616] Fix | Delete
height: 1,
[8617] Fix | Delete
width: 1,
[8618] Fix | Delete
margin: 1,
[8619] Fix | Delete
"margin-left": 1,
[8620] Fix | Delete
"margin-right": 1,
[8621] Fix | Delete
"margin-bottom": 1,
[8622] Fix | Delete
"margin-top": 1,
[8623] Fix | Delete
padding: 1,
[8624] Fix | Delete
"padding-left": 1,
[8625] Fix | Delete
"padding-right": 1,
[8626] Fix | Delete
"padding-bottom": 1,
[8627] Fix | Delete
"padding-top": 1,
[8628] Fix | Delete
"vertical-align": 1
[8629] Fix | Delete
},
[8630] Fix | Delete
properties;
[8631] Fix | Delete
[8632] Fix | Delete
function reportProperty(name, display, msg) {
[8633] Fix | Delete
if (properties[name]) {
[8634] Fix | Delete
if (typeof propertiesToCheck[name] !== "string" || properties[name].value.toLowerCase() !== propertiesToCheck[name]) {
[8635] Fix | Delete
reporter.report(msg || name + " can't be used with display: " + display + ".", properties[name].line, properties[name].col, rule);
[8636] Fix | Delete
}
[8637] Fix | Delete
}
[8638] Fix | Delete
}
[8639] Fix | Delete
[8640] Fix | Delete
function startRule() {
[8641] Fix | Delete
properties = {};
[8642] Fix | Delete
}
[8643] Fix | Delete
[8644] Fix | Delete
function endRule() {
[8645] Fix | Delete
[8646] Fix | Delete
var display = properties.display ? properties.display.value : null;
[8647] Fix | Delete
if (display) {
[8648] Fix | Delete
switch (display) {
[8649] Fix | Delete
[8650] Fix | Delete
case "inline":
[8651] Fix | Delete
// height, width, margin-top, margin-bottom, float should not be used with inline
[8652] Fix | Delete
reportProperty("height", display);
[8653] Fix | Delete
reportProperty("width", display);
[8654] Fix | Delete
reportProperty("margin", display);
[8655] Fix | Delete
reportProperty("margin-top", display);
[8656] Fix | Delete
reportProperty("margin-bottom", display);
[8657] Fix | Delete
reportProperty("float", display, "display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");
[8658] Fix | Delete
break;
[8659] Fix | Delete
[8660] Fix | Delete
case "block":
[8661] Fix | Delete
// vertical-align should not be used with block
[8662] Fix | Delete
reportProperty("vertical-align", display);
[8663] Fix | Delete
break;
[8664] Fix | Delete
[8665] Fix | Delete
case "inline-block":
[8666] Fix | Delete
// float should not be used with inline-block
[8667] Fix | Delete
reportProperty("float", display);
[8668] Fix | Delete
break;
[8669] Fix | Delete
[8670] Fix | Delete
default:
[8671] Fix | Delete
// margin, float should not be used with table
[8672] Fix | Delete
if (display.indexOf("table-") === 0) {
[8673] Fix | Delete
reportProperty("margin", display);
[8674] Fix | Delete
reportProperty("margin-left", display);
[8675] Fix | Delete
reportProperty("margin-right", display);
[8676] Fix | Delete
reportProperty("margin-top", display);
[8677] Fix | Delete
reportProperty("margin-bottom", display);
[8678] Fix | Delete
reportProperty("float", display);
[8679] Fix | Delete
}
[8680] Fix | Delete
[8681] Fix | Delete
// otherwise do nothing
[8682] Fix | Delete
}
[8683] Fix | Delete
}
[8684] Fix | Delete
[8685] Fix | Delete
}
[8686] Fix | Delete
[8687] Fix | Delete
parser.addListener("startrule", startRule);
[8688] Fix | Delete
parser.addListener("startfontface", startRule);
[8689] Fix | Delete
parser.addListener("startkeyframerule", startRule);
[8690] Fix | Delete
parser.addListener("startpagemargin", startRule);
[8691] Fix | Delete
parser.addListener("startpage", startRule);
[8692] Fix | Delete
parser.addListener("startviewport", startRule);
[8693] Fix | Delete
[8694] Fix | Delete
parser.addListener("property", function(event) {
[8695] Fix | Delete
var name = event.property.text.toLowerCase();
[8696] Fix | Delete
[8697] Fix | Delete
if (propertiesToCheck[name]) {
[8698] Fix | Delete
properties[name] = {
[8699] Fix | Delete
value: event.value.text,
[8700] Fix | Delete
line: event.property.line,
[8701] Fix | Delete
col: event.property.col
[8702] Fix | Delete
};
[8703] Fix | Delete
}
[8704] Fix | Delete
});
[8705] Fix | Delete
[8706] Fix | Delete
parser.addListener("endrule", endRule);
[8707] Fix | Delete
parser.addListener("endfontface", endRule);
[8708] Fix | Delete
parser.addListener("endkeyframerule", endRule);
[8709] Fix | Delete
parser.addListener("endpagemargin", endRule);
[8710] Fix | Delete
parser.addListener("endpage", endRule);
[8711] Fix | Delete
parser.addListener("endviewport", endRule);
[8712] Fix | Delete
[8713] Fix | Delete
}
[8714] Fix | Delete
[8715] Fix | Delete
});
[8716] Fix | Delete
[8717] Fix | Delete
/*
[8718] Fix | Delete
* Rule: Disallow duplicate background-images (using url).
[8719] Fix | Delete
*/
[8720] Fix | Delete
[8721] Fix | Delete
CSSLint.addRule({
[8722] Fix | Delete
[8723] Fix | Delete
// rule information
[8724] Fix | Delete
id: "duplicate-background-images",
[8725] Fix | Delete
name: "Disallow duplicate background images",
[8726] Fix | Delete
desc: "Every background-image should be unique. Use a common class for e.g. sprites.",
[8727] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-background-images",
[8728] Fix | Delete
browsers: "All",
[8729] Fix | Delete
[8730] Fix | Delete
// initialization
[8731] Fix | Delete
init: function(parser, reporter) {
[8732] Fix | Delete
"use strict";
[8733] Fix | Delete
var rule = this,
[8734] Fix | Delete
stack = {};
[8735] Fix | Delete
[8736] Fix | Delete
parser.addListener("property", function(event) {
[8737] Fix | Delete
var name = event.property.text,
[8738] Fix | Delete
value = event.value,
[8739] Fix | Delete
i, len;
[8740] Fix | Delete
[8741] Fix | Delete
if (name.match(/background/i)) {
[8742] Fix | Delete
for (i=0, len=value.parts.length; i < len; i++) {
[8743] Fix | Delete
if (value.parts[i].type === "uri") {
[8744] Fix | Delete
if (typeof stack[value.parts[i].uri] === "undefined") {
[8745] Fix | Delete
stack[value.parts[i].uri] = event;
[8746] Fix | Delete
} else {
[8747] Fix | Delete
reporter.report("Background image '" + value.parts[i].uri + "' was used multiple times, first declared at line " + stack[value.parts[i].uri].line + ", col " + stack[value.parts[i].uri].col + ".", event.line, event.col, rule);
[8748] Fix | Delete
}
[8749] Fix | Delete
}
[8750] Fix | Delete
}
[8751] Fix | Delete
}
[8752] Fix | Delete
});
[8753] Fix | Delete
}
[8754] Fix | Delete
});
[8755] Fix | Delete
[8756] Fix | Delete
/*
[8757] Fix | Delete
* Rule: Duplicate properties must appear one after the other. If an already-defined
[8758] Fix | Delete
* property appears somewhere else in the rule, then it's likely an error.
[8759] Fix | Delete
*/
[8760] Fix | Delete
[8761] Fix | Delete
CSSLint.addRule({
[8762] Fix | Delete
[8763] Fix | Delete
// rule information
[8764] Fix | Delete
id: "duplicate-properties",
[8765] Fix | Delete
name: "Disallow duplicate properties",
[8766] Fix | Delete
desc: "Duplicate properties must appear one after the other.",
[8767] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-properties",
[8768] Fix | Delete
browsers: "All",
[8769] Fix | Delete
[8770] Fix | Delete
// initialization
[8771] Fix | Delete
init: function(parser, reporter) {
[8772] Fix | Delete
"use strict";
[8773] Fix | Delete
var rule = this,
[8774] Fix | Delete
properties,
[8775] Fix | Delete
lastProperty;
[8776] Fix | Delete
[8777] Fix | Delete
function startRule() {
[8778] Fix | Delete
properties = {};
[8779] Fix | Delete
}
[8780] Fix | Delete
[8781] Fix | Delete
parser.addListener("startrule", startRule);
[8782] Fix | Delete
parser.addListener("startfontface", startRule);
[8783] Fix | Delete
parser.addListener("startpage", startRule);
[8784] Fix | Delete
parser.addListener("startpagemargin", startRule);
[8785] Fix | Delete
parser.addListener("startkeyframerule", startRule);
[8786] Fix | Delete
parser.addListener("startviewport", startRule);
[8787] Fix | Delete
[8788] Fix | Delete
parser.addListener("property", function(event) {
[8789] Fix | Delete
var property = event.property,
[8790] Fix | Delete
name = property.text.toLowerCase();
[8791] Fix | Delete
[8792] Fix | Delete
if (properties[name] && (lastProperty !== name || properties[name] === event.value.text)) {
[8793] Fix | Delete
reporter.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
[8794] Fix | Delete
}
[8795] Fix | Delete
[8796] Fix | Delete
properties[name] = event.value.text;
[8797] Fix | Delete
lastProperty = name;
[8798] Fix | Delete
[8799] Fix | Delete
});
[8800] Fix | Delete
[8801] Fix | Delete
[8802] Fix | Delete
}
[8803] Fix | Delete
[8804] Fix | Delete
});
[8805] Fix | Delete
[8806] Fix | Delete
/*
[8807] Fix | Delete
* Rule: Style rules without any properties defined should be removed.
[8808] Fix | Delete
*/
[8809] Fix | Delete
[8810] Fix | Delete
CSSLint.addRule({
[8811] Fix | Delete
[8812] Fix | Delete
// rule information
[8813] Fix | Delete
id: "empty-rules",
[8814] Fix | Delete
name: "Disallow empty rules",
[8815] Fix | Delete
desc: "Rules without any properties specified should be removed.",
[8816] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-empty-rules",
[8817] Fix | Delete
browsers: "All",
[8818] Fix | Delete
[8819] Fix | Delete
// initialization
[8820] Fix | Delete
init: function(parser, reporter) {
[8821] Fix | Delete
"use strict";
[8822] Fix | Delete
var rule = this,
[8823] Fix | Delete
count = 0;
[8824] Fix | Delete
[8825] Fix | Delete
parser.addListener("startrule", function() {
[8826] Fix | Delete
count=0;
[8827] Fix | Delete
});
[8828] Fix | Delete
[8829] Fix | Delete
parser.addListener("property", function() {
[8830] Fix | Delete
count++;
[8831] Fix | Delete
});
[8832] Fix | Delete
[8833] Fix | Delete
parser.addListener("endrule", function(event) {
[8834] Fix | Delete
var selectors = event.selectors;
[8835] Fix | Delete
if (count === 0) {
[8836] Fix | Delete
reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule);
[8837] Fix | Delete
}
[8838] Fix | Delete
});
[8839] Fix | Delete
}
[8840] Fix | Delete
[8841] Fix | Delete
});
[8842] Fix | Delete
[8843] Fix | Delete
/*
[8844] Fix | Delete
* Rule: There should be no syntax errors. (Duh.)
[8845] Fix | Delete
*/
[8846] Fix | Delete
[8847] Fix | Delete
CSSLint.addRule({
[8848] Fix | Delete
[8849] Fix | Delete
// rule information
[8850] Fix | Delete
id: "errors",
[8851] Fix | Delete
name: "Parsing Errors",
[8852] Fix | Delete
desc: "This rule looks for recoverable syntax errors.",
[8853] Fix | Delete
browsers: "All",
[8854] Fix | Delete
[8855] Fix | Delete
// initialization
[8856] Fix | Delete
init: function(parser, reporter) {
[8857] Fix | Delete
"use strict";
[8858] Fix | Delete
var rule = this;
[8859] Fix | Delete
[8860] Fix | Delete
parser.addListener("error", function(event) {
[8861] Fix | Delete
reporter.error(event.message, event.line, event.col, rule);
[8862] Fix | Delete
});
[8863] Fix | Delete
[8864] Fix | Delete
}
[8865] Fix | Delete
[8866] Fix | Delete
});
[8867] Fix | Delete
[8868] Fix | Delete
CSSLint.addRule({
[8869] Fix | Delete
[8870] Fix | Delete
// rule information
[8871] Fix | Delete
id: "fallback-colors",
[8872] Fix | Delete
name: "Require fallback colors",
[8873] Fix | Delete
desc: "For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",
[8874] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Require-fallback-colors",
[8875] Fix | Delete
browsers: "IE6,IE7,IE8",
[8876] Fix | Delete
[8877] Fix | Delete
// initialization
[8878] Fix | Delete
init: function(parser, reporter) {
[8879] Fix | Delete
"use strict";
[8880] Fix | Delete
var rule = this,
[8881] Fix | Delete
lastProperty,
[8882] Fix | Delete
propertiesToCheck = {
[8883] Fix | Delete
color: 1,
[8884] Fix | Delete
background: 1,
[8885] Fix | Delete
"border-color": 1,
[8886] Fix | Delete
"border-top-color": 1,
[8887] Fix | Delete
"border-right-color": 1,
[8888] Fix | Delete
"border-bottom-color": 1,
[8889] Fix | Delete
"border-left-color": 1,
[8890] Fix | Delete
border: 1,
[8891] Fix | Delete
"border-top": 1,
[8892] Fix | Delete
"border-right": 1,
[8893] Fix | Delete
"border-bottom": 1,
[8894] Fix | Delete
"border-left": 1,
[8895] Fix | Delete
"background-color": 1
[8896] Fix | Delete
};
[8897] Fix | Delete
[8898] Fix | Delete
function startRule() {
[8899] Fix | Delete
lastProperty = null;
[8900] Fix | Delete
}
[8901] Fix | Delete
[8902] Fix | Delete
parser.addListener("startrule", startRule);
[8903] Fix | Delete
parser.addListener("startfontface", startRule);
[8904] Fix | Delete
parser.addListener("startpage", startRule);
[8905] Fix | Delete
parser.addListener("startpagemargin", startRule);
[8906] Fix | Delete
parser.addListener("startkeyframerule", startRule);
[8907] Fix | Delete
parser.addListener("startviewport", startRule);
[8908] Fix | Delete
[8909] Fix | Delete
parser.addListener("property", function(event) {
[8910] Fix | Delete
var property = event.property,
[8911] Fix | Delete
name = property.text.toLowerCase(),
[8912] Fix | Delete
parts = event.value.parts,
[8913] Fix | Delete
i = 0,
[8914] Fix | Delete
colorType = "",
[8915] Fix | Delete
len = parts.length;
[8916] Fix | Delete
[8917] Fix | Delete
if (propertiesToCheck[name]) {
[8918] Fix | Delete
while (i < len) {
[8919] Fix | Delete
if (parts[i].type === "color") {
[8920] Fix | Delete
if ("alpha" in parts[i] || "hue" in parts[i]) {
[8921] Fix | Delete
[8922] Fix | Delete
if (/([^\)]+)\(/.test(parts[i])) {
[8923] Fix | Delete
colorType = RegExp.$1.toUpperCase();
[8924] Fix | Delete
}
[8925] Fix | Delete
[8926] Fix | Delete
if (!lastProperty || (lastProperty.property.text.toLowerCase() !== name || lastProperty.colorType !== "compat")) {
[8927] Fix | Delete
reporter.report("Fallback " + name + " (hex or RGB) should precede " + colorType + " " + name + ".", event.line, event.col, rule);
[8928] Fix | Delete
}
[8929] Fix | Delete
} else {
[8930] Fix | Delete
event.colorType = "compat";
[8931] Fix | Delete
}
[8932] Fix | Delete
}
[8933] Fix | Delete
[8934] Fix | Delete
i++;
[8935] Fix | Delete
}
[8936] Fix | Delete
}
[8937] Fix | Delete
[8938] Fix | Delete
lastProperty = event;
[8939] Fix | Delete
});
[8940] Fix | Delete
[8941] Fix | Delete
}
[8942] Fix | Delete
[8943] Fix | Delete
});
[8944] Fix | Delete
[8945] Fix | Delete
/*
[8946] Fix | Delete
* Rule: You shouldn't use more than 10 floats. If you do, there's probably
[8947] Fix | Delete
* room for some abstraction.
[8948] Fix | Delete
*/
[8949] Fix | Delete
[8950] Fix | Delete
CSSLint.addRule({
[8951] Fix | Delete
[8952] Fix | Delete
// rule information
[8953] Fix | Delete
id: "floats",
[8954] Fix | Delete
name: "Disallow too many floats",
[8955] Fix | Delete
desc: "This rule tests if the float property is used too many times",
[8956] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-too-many-floats",
[8957] Fix | Delete
browsers: "All",
[8958] Fix | Delete
[8959] Fix | Delete
// initialization
[8960] Fix | Delete
init: function(parser, reporter) {
[8961] Fix | Delete
"use strict";
[8962] Fix | Delete
var rule = this;
[8963] Fix | Delete
var count = 0;
[8964] Fix | Delete
[8965] Fix | Delete
// count how many times "float" is used
[8966] Fix | Delete
parser.addListener("property", function(event) {
[8967] Fix | Delete
if (event.property.text.toLowerCase() === "float" &&
[8968] Fix | Delete
event.value.text.toLowerCase() !== "none") {
[8969] Fix | Delete
count++;
[8970] Fix | Delete
}
[8971] Fix | Delete
});
[8972] Fix | Delete
[8973] Fix | Delete
// report the results
[8974] Fix | Delete
parser.addListener("endstylesheet", function() {
[8975] Fix | Delete
reporter.stat("floats", count);
[8976] Fix | Delete
if (count >= 10) {
[8977] Fix | Delete
reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule);
[8978] Fix | Delete
}
[8979] Fix | Delete
});
[8980] Fix | Delete
}
[8981] Fix | Delete
[8982] Fix | Delete
});
[8983] Fix | Delete
[8984] Fix | Delete
/*
[8985] Fix | Delete
* Rule: Avoid too many @font-face declarations in the same stylesheet.
[8986] Fix | Delete
*/
[8987] Fix | Delete
[8988] Fix | Delete
CSSLint.addRule({
[8989] Fix | Delete
[8990] Fix | Delete
// rule information
[8991] Fix | Delete
id: "font-faces",
[8992] Fix | Delete
name: "Don't use too many web fonts",
[8993] Fix | Delete
desc: "Too many different web fonts in the same stylesheet.",
[8994] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-web-fonts",
[8995] Fix | Delete
browsers: "All",
[8996] Fix | Delete
[8997] Fix | Delete
// initialization
[8998] Fix | Delete
init: function(parser, reporter) {
[8999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function