Commit a1015ade authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Add hyphen utility classes to Tailwind

Tailwind doesn't provide `hyphens` utility classes out of the box. We
should follow up by investigating whether we really want to enable
hyphenation and what the current support landscape is for hyphenation.
parent 9ea1e6d7
......@@ -32,6 +32,6 @@
// TODO: Research history of this and whether it's still appropriate
p {
hyphens: auto;
@apply hyphens-auto;
}
}
......@@ -179,6 +179,7 @@ export default {
'annotator-md': '480px',
// Tablet and up
'annotator-lg': '600px',
tall: { raw: '(min-height: 700px)' },
},
spacing: {
// These are selective, pixel-specific variants of Tailwind's default
......@@ -206,5 +207,16 @@ export default {
// sub-components to select for that state.
addVariant('sidebar-collapsed', '.sidebar-collapsed &');
}),
plugin(({ addUtilities }) => {
// Tailwind does not provide hyphens-related utility classes.
addUtilities({
'.hyphens-none': {
hyphens: 'none',
},
'.hyphens-auto': {
hyphens: 'auto',
},
});
}),
],
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment