Description Objects from the Class Slots Extends Methods Author(s) References See Also Examples
This is the basic class for representing a parsed Cascading Style Sheet
in RCSS
. It is a reference to a C-level object which
holds the parsed information.
We can treate the style sheet like a list, asking for its length,
its names, individual elements or subsets of elements,
and using lapply
and sapply
to invoke a function on each
of the elements.
The CSS is actually a tree and we can access the sub-elements by
converting the top-level elements to R objects using
asCSSObject
.
Some classes of elements within the style sheet have methods for
accessing the contents directly from the C-level object, e.g.
url
, sheet
and media_list
in an IMPORT_RULE
object.
Objects of these classes are produced implicitly
via readCSS
.
docName
:character. The name of the document (file or URL) from which this CSS content was read. This is used to identify the origin of the CSS content and when resolving relative imports.
ref
:Object of class "externalptr"
which is the
reference to the C-level object.
Class "ExternalRef"
, directly.
signature(x = "CSSStyleSheet")
: retrieve a subset of
the top-level elements in the style sheet.
signature(x = "CSSStyleSheet")
: retrieve an
individual top-level element of the style sheet.
signature(x = "CSSStyleSheet")
: return the
number of top-level elements in the style sheet. Note that this
ignores page and import nodes.
signature(x = "CSSStyleSheet")
: get (heuristic)
names of the top-level names in the style sheet
Duncan Temple Lang
libcroco at http://www.freespiders.org/projects/libcroco Cascading Style Sheets http://www.w3.org/Style/CSS/
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.