Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/fourtyone11/origin-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/node_modules/stylelint/lib/utils/atRuleParamIndex.js')
-rw-r--r--assets/node_modules/stylelint/lib/utils/atRuleParamIndex.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/assets/node_modules/stylelint/lib/utils/atRuleParamIndex.js b/assets/node_modules/stylelint/lib/utils/atRuleParamIndex.js
new file mode 100644
index 0000000..d08ebc0
--- /dev/null
+++ b/assets/node_modules/stylelint/lib/utils/atRuleParamIndex.js
@@ -0,0 +1,16 @@
+'use strict';
+
+/**
+ * @param {import('postcss').AtRule} atRule
+ * @returns {number}
+ */
+module.exports = function(atRule) {
+ // Initial 1 is for the `@`
+ let index = 1 + atRule.name.length;
+
+ if (atRule.raws.afterName) {
+ index += atRule.raws.afterName.length;
+ }
+
+ return index;
+};