zed/crates/breadcrumbs
Marshall Bowers 404adbce5b
Encode rem values derived from pixels using rems_from_px (#9367)
This PR adds a new `rems_from_px` helper function that can be used to
compute rem values based on a pixel value.

This is something we do fairly commonly, where we want to express a size
that is a given pixel size at the base rem size (e.g., "14px when the
rem size is 16px").

`rems_from_px` helps make the intent more explicit, as well as prevent
the base rem size from being duplicated everywhere.

Note: Ideally we would want `rems_from_px` to be `const`, but that
depends on https://github.com/rust-lang/rust/issues/57241.

Release Notes:

- N/A
2024-03-14 16:39:55 -04:00
..
src Encode rem values derived from pixels using rems_from_px (#9367) 2024-03-14 16:39:55 -04:00
Cargo.toml Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00