Core Properties

Below are the properties eCSStender exposes via its API.

at

Returns: Object

The eCSStender.at property is an object containing any extended at-rules not handled by other means. Each at-rule definition encountered will be stored, keyed by its name, in eCSStender.at, based on its form. For more, read Working with Extended At-rules.

filters

Removed in 1.0

Returns: Object

eCSStender supports the storage of custom methods using setFilter(). These methods are the exposed as part of the eCSStender.filters object.

fonts

Returns: Array

An array of author-defined fonts referenced in the stylesheet. Each font declaration is stored as JSON, with each rule being captured as a property within that Object. For example:
@font-face {
  font-family: 'Comfortaa';
  font-weight: normal;
  src: url('/fonts/Comfortaa_Regular');
}
is stored as
{
  'font-family': 'Comfortaa',
  'font-weight': 'normal',
  'src': "url('/fonts/Comfortaa_Regular')"
}

methods

Returns: Object

eCSStender supports the storage of custom methods using addMethod(). These methods are the exposed as part of the eCSStender.methods object.

name

Returns: String

Tells you it’s eCSStender (in case you want to alias the eCSStender to something shorter).

pages

Returns: Object

Each @page declaration is captured as a property of pages, assigned to the appropriate key. For example, declaring
@page {
  margin: 3cm;
}
@page :right {
  margin-left: 5cm;
}
would result in eCSStender.pages being equal to
{
  'all': {
    'margin': '3cm'

  },
  'right': {
    'margin-left': '5cm'

  }
}

version

Returns: String

The current version of the eCSStender object.