# ui_input: Only render number field border on focus \(\#46165\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f84589323883c5430dbc636966bb74838540f526)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f84589323883c5430dbc636966bb74838540f526

Requested commit: f84589323883c5430dbc636966bb74838540f526

Commit: f84589323883c5430dbc636966bb74838540f526

Tree: 816a95f050d930a4becdf0af1ef285d67b6d7cbe

Author: Dino

Committer: GitHub

## Message

```
ui_input: Only render number field border on focus (#46165)

The `NumberField.render` method was always rendering a `border_1` for
the number input, even when not focused. Even though it was using
`cx.theme().colors().border_transparent`, some themes don't have this
value set to a fully transparent color so it ends up looking a little
bit weird.

As such, this commit updates the way the border is rendered, to ensure
it's actually only rendered, i.e., the `border_1` method is only called,
when the field is actually focused.

Release Notes:

- Improved rendering of border on number field's input to ensure it's
only rendered when the field is focused
```

## Parents

- [9e9269b52198659639dc84942f37306855ba319f](https://git.cafe/gitcafe/zed/commit/9e9269b52198659639dc84942f37306855ba319f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f84589323883c5430dbc636966bb74838540f526?format=markdown)
