---
title: "CSSRuleList | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# Interface CSSRuleList

A **`CSSRuleList`** represents an ordered collection of read-only CSSRule objects.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRuleList)

interface CSSRuleList {  
    [length](#length): number;  
    ["\[iterator\]"](#iterator-1)(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/)\>;  
    [item](#item-1)(index: number): [CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/) | null;  
    \[index: number\]: [CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/);  
}

#### Indexable

-   \[index: number\]: [CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/)
    

##### Index

### Properties[](#properties)

[length](#length)

### Methods[](#methods)

[\[iterator\]](#iterator) [item](#item)

## Properties[](#properties-1)

### `Readonly`length[](#length)

length: number

The **`length`** property of the CSSRuleList interface returns the number of CSSRule objects in the list.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length)

## Methods[](#methods-1)

### \[iterator\][](#iterator)

-   "\[iterator\]"(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/)\>[](#iterator-1)
    
    #### Returns [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/)\>
    

### item[](#item)

-   item(index: number): [CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/) | null[](#item-1)
    
    The **`item()`** method of the CSSRuleList interface returns the CSSRule object at the specified index or null if the specified index doesn't exist.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRuleList/item)
    
    #### Parameters
    
    -   index: number
    
    #### Returns [CSSRule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSRule/) | null
