# JSStyle

## Properties Summarized

| Type                                                                         | Name          | Summary                           |
| ---------------------------------------------------------------------------- | ------------- | --------------------------------- |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) | [text](#text) | The textual content of the style. |

## Methods Summarized

| Type                                                                          | Name                  | Summary                              |
| ----------------------------------------------------------------------------- | --------------------- | ------------------------------------ |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)  | [getName()](#getname) | Gets the name of the style.          |
| [UUID](https://docs.servoy.com/reference/servoycore/dev-api/application/uuid) | [getUUID()](#getuuid) | Returns the UUID of the style object |

## Properties Detailed

### text

The textual content of the style.

**Type**\
[String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)

**Sample**

```js
var st = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
st.text = st.text + 'field { background-color: blue; }';
form.styleName = 'myStyle';
application.output('Style name is: ' + st.getName());
```

## Methods Detailed

### getName()

Gets the name of the style.

**Returns:** [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) A String holding the name of the style.

**Sample**

```js
var st = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
st.text = st.text + 'field { background-color: blue; }';
form.styleName = 'myStyle';
application.output('Style name is: ' + st.getName());
```

### getUUID()

Returns the UUID of the style object

**Returns:** [UUID](https://docs.servoy.com/reference/servoycore/dev-api/application/uuid)

**Sample**

```js
var st = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
application.output(st.getUUID().toString());
```
