(node)
| 167 | } |
| 168 | |
| 169 | function getValueRootOffset(node) { |
| 170 | let result = node.source.startOffset; |
| 171 | if (typeof node.prop === "string") { |
| 172 | result += node.prop.length; |
| 173 | } |
| 174 | |
| 175 | if (node.type === "css-atrule" && typeof node.name === "string") { |
| 176 | result += |
| 177 | 1 + node.name.length + node.raws.afterName.match(/^\s*:?\s*/)[0].length; |
| 178 | } |
| 179 | |
| 180 | if (node.type !== "css-atrule" && typeof node.raws?.between === "string") { |
| 181 | result += node.raws.between.length; |
| 182 | } |
| 183 | |
| 184 | return result; |
| 185 | } |
| 186 | |
| 187 | function getAtRuleParamsRootOffset(node) { |
| 188 | let result = node.source.startOffset; |
no test coverage detected