getPos: Get the location in the CSS file of a CSS element

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

This function gets the line and column number of a given CSS element within a CSS document.

Usage

1
getPos(x, ...)

Arguments

x

the CSS element whose location is of interest. This has to be a reference to a C-level object at present.

...

additional parameters for methods.

Value

A integer vector with three elements. These give the line number, column number (position within that line) and the count of the number of characters from the beginning of the CSS document.

Note

This gives the location of the end of several CSS elements, and not the beginning.

Author(s)

Duncan Temple Lang

References

libcroco at http://www.freespiders.org/projects/libcroco

Cascading Style Sheets http://www.w3.org/Style/CSS/

See Also

readCSS [[ method for a CSSStyleSheet-class

Examples

1
2
3
4
 f = system.file("samples", "test.css", package = "RCSS")
 css = readCSS( f )

 getPos(css[["media"]])

omegahat/RCSS documentation built on May 24, 2019, 1:52 p.m.