foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

How to stop hyphenation?

Open lspoor opened this issue 11 years ago • 9 comments

Title says it all really, I'm getting paragraphs and headings which are hyphenating..

lspoor avatar Sep 14 '15 08:09 lspoor

Look for this:

td { word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; }

in ink css

change to

td { word-break: break-word; -webkit-hyphens: none; -moz-hyphens: none; hyphens: none; border-collapse: collapse !important; }

freemagee avatar Sep 21 '15 10:09 freemagee

Those styles are in the foundation-emails package itself inside of _normalize.scss. The only way to disable them is to add more CSS overriding them. This works, but is messy. Would prefer an option to disable it.

tedw avatar Nov 14 '16 16:11 tedw

Even in 2017 the hyphenation is still in foundation-emails. I too have overwritten it with the following adjustments in my custom_css.scss (which is imported latest and would therefore override the classes defined in other css files):

td { word-break: keep-all; -moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; }

I agree it is messy and should be in the settings.scss so we are able to override it before it gets inlined.

Luneya avatar Feb 28 '17 11:02 Luneya

The solution that @Luneya pointed works. However, it's generating a lot of extra size on the output of the HTML. Use it carefully.

renatocarvalho avatar Sep 14 '17 04:09 renatocarvalho

@Luneya solution did the trick for me

baticodes avatar Sep 22 '17 14:09 baticodes

Hi everyone. I wonder if a better solution is available. As renato says, this one is generating a lot of extra size on the output of the HTML.

giotannico avatar Feb 16 '18 09:02 giotannico

Why not just deleting the td definitions for hyphenation from _normalize.scss (lines 78-84)? This way it doesn't create any additional html.

nikitasol avatar Feb 16 '18 10:02 nikitasol

I don't have access to _normalize.scss in foundation mail. Am I wrong? app.scss is @importing 'foundation-emails' and I believe there is is the rule

giotannico avatar Feb 16 '18 10:02 giotannico

normalize.scss is in node-modules > foundation-emails > scss > components

nikitasol avatar Feb 16 '18 10:02 nikitasol