Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
method default.prototype.origin
import { default } from "https://deno.land/x/postcss@8.4.16/lib/input.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.