---
url: >-
  https://plugin.stripo.email/extensions/reference/nodes/ImmutableCssAttributeNode.md
---
# ImmutableCssAttributeNode

Interface for immutable CSS attribute (property) nodes.

```typescript
interface ImmutableCssAttributeNode extends BaseImmutableCssNode
```

## Description

`ImmutableCssAttributeNode` represents CSS properties within rules. Each attribute node contains a property name and value pair (e.g., `color: blue`). This interface provides methods to access both the property name and its value.

## Import

```typescript
import { ImmutableCssAttributeNode } from '@stripoinc/ui-editor-extensions';
```

## Inheritance

Extends: [`BaseImmutableCssNode`](./BaseImmutableCssNode.md)

## Methods

### getAttributeName()

Retrieves the name of the CSS property.

```typescript
getAttributeName(): string
```

**Returns:** `string` - The CSS property name

**Throws:** `Error` if the node cannot be found

**Example:**

```typescript
const propertyName = attribute.getAttributeName();
// "color", "font-size", "background-color", etc.
```

***

### getAttributeValue()

Retrieves the value of the CSS property.

```typescript
getAttributeValue(): string
```

**Returns:** `string` - The CSS property value

**Throws:** `Error` if the node cannot be found

**Example:**

```typescript
const propertyValue = attribute.getAttributeValue();
// "blue", "16px", "#ffffff", "1.5em", etc.
```
