# style

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/prelude/style/function-style/

**function** · [`ferroui-view`](/docs/0.5.0/api/ferroui-view/) · v0.5.0

```rust
fn style(selector: &str) -> StyleBuilder
```

A style of the selector `selector`, in the syntax of XAML (`Button`,
`Button.accent`, `StackPanel > TextBlock`, `:pointerover`, `^.selected`
in a nested style). Type names are the classes of FerroUI.Base and
FerroUI.Controls and of the crates that registered their types.
## Panics
Panics with the message of the parser when the selector does not parse.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/style.rs#L31)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
