Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow making text flushed left or justified #27300

Closed
oandregal opened this issue Nov 26, 2020 · 9 comments
Closed

Allow making text flushed left or justified #27300

oandregal opened this issue Nov 26, 2020 · 9 comments
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json

Comments

@oandregal
Copy link
Member

Justified text was removed from the WordPress text alignment options in version 4.7 due to concerns with readability. In building the block editor, we didn’t add this back, mostly because the reason for removing it in the first place remained valid, but also because adjusting the alignment of multiple paragraphs at once did not exist at that time. It was added to WordPress.com as an extra option, but the experience of applying it is bad, for the reasons you’ve outlined.

Legibility problems aside, there are cases where people need justified text; it could be due to a newspaper styleguide, or just a request from a teacher. In both those cases, justified text should arguably be a global toggle, a change to the default text alignment, so it applies to every post and page there ever was, as opposed being a property you apply to one paragraph at a time, every time you write.

A potential approach we can take is to add that feature in the “Global Styles” sidebar.

screenshot-2020-11-26-at-09 56 19-1

@oandregal oandregal added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Nov 26, 2020
@oandregal oandregal mentioned this issue Nov 26, 2020
82 tasks
@jorgefilipecosta
Copy link
Member

@jasmussen, @nosolosw, Is this something we need for v1 or it is something we can ship after v1?

@oandregal
Copy link
Member Author

I don't have a strong opinion, although would think it doesn't, no. FWIW, it's already listed in the "Backlog" section of the tracking issue #20331 (did it this morning while updating the second iteration to reflect our current focuses).

@aleone89
Copy link

Many thanks for pulling this together @nosolosw :) and having this in global styles makes sense - mainly because of the reasons stated and because, when this is requested, CSS is employed to make everything Justified throughout.

Just my additional two-cents here - instead of having "Left Aligned" as the wording, I would consider replacing this with something like "Default" as to show that the default would be what is set, when content is created in pages/posts. What do you think? I hope that is useful :)

@jasmussen
Copy link
Contributor

Just my additional two-cents here - instead of having "Left Aligned" as the wording, I would consider replacing this with something like "Default" as to show that the default would be what is set, when content is created in pages/posts. What do you think? I hope that is useful :)

Thanks for sharing.

It reminds me that we have to consider countries that default to writing right to left. The question then becomes whether we show all three options, left aligned, right aligned, and justified, or whether we simply show left aligned and justified for LTR languages and right aligned and justified for RTL languages.

@aleone89
Copy link

aleone89 commented Dec 1, 2020

It reminds me that we have to consider countries that default to writing right to left. The question then becomes whether we show all three options, left aligned, right aligned, and justified, or whether we simply show left aligned and justified for LTR languages and right aligned and justified for RTL languages.

RTL is usually set when a language is set via wp-admin > Settings > Language. This is also a universal setting, much like global styles.

@jasmussen
Copy link
Contributor

RTL is usually set when a language is set via wp-admin > Settings > Language. This is also a universal setting, much like global styles.

Absolutely. But we can't show a "Left aligned" icon and label when someone has that setting enabled, can we?

@aristath
Copy link
Member

aristath commented Dec 1, 2020

The question then becomes whether we show all three options, left aligned, right aligned, and justified, or whether we simply show left aligned and justified for LTR languages and right aligned and justified for RTL languages.

I'd say default/justified would be a lot better ("default" being left for LTR and right for RTL). Alternatively we'd need 4 options not 3 (there's also center so it would be left/center/right/justified) and it would probably be a little overkill. Besides, if we see that we need more we can always add them as we go. But once they're in it's almost impossible to remove them, so I'd say we start with the absolute essentials and add more options if and when that becomes necessary.

@jasmussen
Copy link
Contributor

Yep, great thought, start simple and add once it's clear it's necessary. So:

I'd say default/justified would be a lot better ("default" being left for LTR and right for RTL).

Let's go with that for the first version 💯

@danielbachhuber
Copy link
Member

Closing in favor of #48202

@danielbachhuber danielbachhuber closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants