Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
method Input.prototype.origin
Re-export
import { Input } from "https://deno.land/x/postcss@8.4.16/lib/postcss.js";

Reads the input source map and returns a symbol position in the input source (e.g., in a Sass file that was compiled to CSS before being passed to PostCSS). Optionally takes an end position, exclusive.

root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 }
root.source.input.origin(1, 1, 1, 4)
//=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 }

Parameters

line: number

Line for inclusive start position in input CSS.

column: number

Column for inclusive start position in input CSS.

optional
endLine: number

Line for exclusive end position in input CSS.

optional
endColumn: number

Column for exclusive end position in input CSS.

Returns

FilePosition | false

Position in input source.