facebook / facebook/docusaurus

Announcement bar text being cut off

未关闭
#7,815 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug domain: theme
主要语言
TypeScript
星标
66.2k
派生
10k
平均合并
1 天 3 小时
30 天内合并 PR
52

描述

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).

### Prerequisites

- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn clear` command.
- [X] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
- [X] I have tried creating a repro with https://new.docusaurus.io.
- [X] I have read the console error message carefully (if applicable).

### Description

Announcement bar text is being cut off on some display sizes if the announcement is long enough.

[View demo on codesandbox.](https://codesandbox.io/s/blissful-currying-nqeocf?file=/docusaurus.config.js&resolutionWidth=997&resolutionHeight=675) In this example the bug will occur at a screen size of 997px.

### Reproducible demo

https://codesandbox.io/s/blissful-currying-nqeocf?file=/docusaurus.config.js&resolutionWidth=997&resolutionHeight=675

### Steps to reproduce

1. Add an announcement that is sufficiently long
2. Shrink the window size down and the issue should appear when the announcement occupies more than 1 line.

### Expected behavior

The announcement bar should resize to fit the whole message.

### Actual behavior

The announcement bar is too small to fit the whole message. It clips the message vertically.

![image](https://user-images.githubusercontent.com/26263425/180076170-14145e5c-b931-4fb6-b237-dccc48593ecb.png)

### Your environment

_No response_

### Self-service

- [x] I'd be willing to fix this bug myself.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。