Automattic / Automattic/jetpack

Button Block: better account for alignment on multi-line text

Open
#19,391 0 comments 0 reactions 0 assignees View on GitHub
[Block] Button [Pri] Low Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

`white-space: pre-wrap` causes the button text to account for white space when centering text causing it to look slightly offset when it spans several lines:

![screenshot-2021-04-01-at-19 42 01](https://user-images.githubusercontent.com/426388/113412684-373e6180-93b9-11eb-8800-7af942fc3aff.png)

Original report: p8oabR-DS-p2#comment-5131

Contributor guide

Open the contributing guide

Research direction

Start by locating the Button Block styles and reproducing the reported case with multi-line text and `white-space: pre-wrap`. Compare the current centered rendering with the screenshot and verify that the text no longer appears offset when the issue is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.