UNPKG
ec0lint-style
Version:
latest (2.1.1)
2.1.1
2.1.0
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
CSS linter for reducing digital footprint with ec0lint.
ec0lint.com
ec0lint/ec0lint-style
ec0lint-style
/
lib
/
utils
/
atRuleParamIndex.js
17 lines
(13 loc)
•
285 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'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; };