Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fed_dev/deps.ts>postcss.Input#origin

A Bundler with the web in mind.
Latest
method postcss.Input.prototype.origin
Re-export
import { postcss } from "https://deno.land/x/fed_dev@0.9.0/deps.ts";
const { Input } = postcss;

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.