# Fix center element wrapper size \(\#10672\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 20554d0296322c64853b18e43d8d39db0da0c45e

Requested commit: 20554d0296322c64853b18e43d8d39db0da0c45e

Commit: 20554d0296322c64853b18e43d8d39db0da0c45e

Tree: 0e96ee7012b9a4e597f58ed546b508946f7961f0

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Fix center element wrapper size (#10672)

Fixes
https://github.com/zed-industries/zed/pull/9754#pullrequestreview-2005401133
Fixes
https://github.com/zed-industries/zed/pull/9754#issuecomment-2060536590
Closes https://github.com/zed-industries/zed/pull/10669

* Updates the docs to use a proper max value for the centered layout
padding (0.4 instead of 0.45)
* Makes the `center` wrapper (`h_flex`) to be of size of the `center`
element always, to ensure terminal lines are displayed correctly

The letter fix is somewhat hacky: while it does the right thing right
now, it does not prevent us from future mistakes like these, and does
not explain why the bottom dock could be of one, smaller, height, and
its contents, the terminal pane/terminal element/something else would
think that it has a larger height, thus breaking the scrolling and
rendering.
cc @alygin if you're interested to solve another layout-related thing.

Release Notes:

- N/A
```

## Parents

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

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