# Add \`\.visible_on_hover\` helper method \(\#3639\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 137e4e9251937ce5268ab0f0b3391f1ef641d6e4

Requested commit: 137e4e9251937ce5268ab0f0b3391f1ef641d6e4

Commit: 137e4e9251937ce5268ab0f0b3391f1ef641d6e4

Tree: 5595b2a2b0b2afe179b72e8e4ef48446990664b5

Author: Marshall Bowers

Committer: GitHub

## Message

````
Add `.visible_on_hover` helper method (#3639)

This PR adds a `.visible_on_hover` helper method that can be used to
make an element only visible on hover.

I noticed we were repeating this similar stanza in a bunch of different
spots:

```rs
some_element
    .invisible()
    .group_hover("", |style| style.visible())
``` 

so it seemed like a nice thing to factor out into a reusable utility.

Release Notes:

- N/A
````

## Parents

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

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