How about adding the text-justify
CSS rule
#13509
Closed
PrinOrange
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, In CSS, the
text-justify
property is used to control the alignment of text at both ends of a line under thetext-align:justify
. This property is typically used for multi-line text. The tailwindcss does not support thetext-justify
rule as far. So I think it's necessary for enroll it now.Here is the documentation in MDN for
text-justify
CSS rule.Basic syntax:
auto
: The browser automatically selects the justification method. Most browsers default tointer-word
.none
: Default value, the browser automatically selects the justification method based on the text content.inter-word
: Adds spacing between words to fill the line as much as possible.inter-ideograph
: Adds spacing between ideographic characters, commonly used for Chinese typography.inter-cluster
: Adds spacing between character clusters, suitable for certain font-specific situations.distribute
: Stretches each word to evenly distribute text across the line.kashida
: In some specific fonts and scripts, stretches or contracts text by inserting "kashida" (a special elongation mark) to achieve alignment.newspaper
: Simulates newspaper layout, making each line's width as similar as possible.distribute-all-lines
: Stretches text on each line to make all lines equal in length.The rendering effects of these values can vary depending on the browser and font used.
For example,
In this example:
width: 300px;
)..text
.text-align: justify;
to justify the text at both ends of each line.text-justify: inter-word;
to add spacing between words, ensuring that the text fills the line as much as possible with the words evenly spaced.This will result in the text inside the
.text
element being justified with spaces between words, creating a visually pleasing layout within the 300-pixel wide container.Beta Was this translation helpful? Give feedback.
All reactions