Skip to content

Commit 6accdbe

Browse files
committed
Add a tailwind hyp-wrap-anywhere utility
1 parent ad037ed commit 6accdbe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/tailwind.preset.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,5 +159,14 @@ export default /** @type {Partial<import('tailwindcss').Config>} */ ({
159159
// See https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-parent-state
160160
addVariant('input-group', '.input-group &');
161161
}),
162+
plugin(({ addUtilities }) => {
163+
addUtilities({
164+
// Tailwind v3 does not provide this specific break utility: https://v3.tailwindcss.com/docs/word-break
165+
// Tailwind v4 does have an equivalent utility that we can eventually adopt https://tailwindcss.com/docs/overflow-wrap#wrapping-anywhere
166+
'.hyp-wrap-anywhere': {
167+
'overflow-wrap': 'anywhere',
168+
},
169+
});
170+
}),
162171
],
163172
});

0 commit comments

Comments
 (0)