# Add general-purpose functions for sizing in viewport units \(\#3833\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0f33775a91a5733285ef1dd222200e6024f8caf7

Requested commit: 0f33775a91a5733285ef1dd222200e6024f8caf7

Commit: 0f33775a91a5733285ef1dd222200e6024f8caf7

Tree: 23a2ef57e82492dc8ae7c16e321bb20007a1f0ed

Author: Marshall Bowers

Committer: GitHub

## Message

```
Add general-purpose functions for sizing in viewport units (#3833)

This PR adds general-purpose functions for obtaining a `Length` in
viewport units.

Previously in #3600 we had added specific variants of `w` and `h` that
took viewport units, but I think it makes more sense to just have a
primitive that can compose with any styling method that accepts a
`Length` or `Into<Length>`.

Release Notes:

- N/A
```

## Parents

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

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