Class text balanced
Discussed in https://github.com/orgs/twbs/discussions/41368
Originally posted by abielmagudev April 12, 2025 Hi friends, can you add a class for balanced text?
.text-balanced {
text-wrap: balance;
}
<p class="text-balanced">This is a text balanced by a class of CSS.</p>
I think the class name should be text-balance rather than text-balanced
Then it exactly matches the text-wrap property value.
FWIW; Tailwind use text-balance too: https://tailwindcss.com/docs/text-wrap#quick-reference
(I was considering suggesting text-wrap-balance, but it's a bit long and unnecessarily verbose probably)
cc @viniciusvts
text balance is the same with text-nowrap?
text balance is the same with text-nowrap?
no, it's different. Check https://developer.chrome.com/docs/css-ui/css-text-wrap-balance