UNPKG

285 BJavaScriptView Raw
1'use strict';
2
3/**
4 * @param {import('postcss').AtRule} atRule
5 * @returns {number}
6 */
7module.exports = function (atRule) {
8 // Initial 1 is for the `@`
9 let index = 1 + atRule.name.length;
10
11 if (atRule.raws.afterName) {
12 index += atRule.raws.afterName.length;
13 }
14
15 return index;
16};