Implement the hyphenate-limit-chars property
Categories
(Core :: Layout: Text and Fonts, enhancement, P3)
Tracking
()
People
(Reporter: hallo, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: feature)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
- Use CSS Hyphenation for a sentence
- Find out that it is also uses Hyphenation for very short words
- Try to find a solution and fail to do so
Actual results:
The hyphenate-limit-chars property is currently not supported in Firefox. It should work as the -ms-hyphenate-limit-chars property in IE/Edge: https://msdn.microsoft.com/en-us/library/hh771865(v=vs.85).aspx
Expected results:
The hyphenate-limit-chars property should be supported in Firefox, so developers can decide how many characters a word should have before hyphens are used and how many characters before/after the break should be the minimum.
Comment 1•6 years ago
|
||
I've moved the bug to a new component and the guys from there will bet an idea of what should o whit this.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Hmm, well, is this in any spec?
Comment 3•6 years ago
|
||
It's in the CSS Text 4 draft:
https://drafts.csswg.org/css-text-4/#hyphenate-char-limits
Comment 4•3 years ago
|
||
Hi do we have any news? Will this property be implemented soon?
kind regards
Comment 5•3 years ago
|
||
Comment 6•3 years ago
|
||
I took a stab at the CSS side of this (currently not hooked up to any actual layout behavior); WIP patch is above. Currently this seems to mostly work, but fails the transitions test at layout/style/test/test_transitions_per_property.html, so it's not 100% complete.
Agreed. I can't believe there is so little innovation in the area of hyphenation.
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Hey Jonathan, an Intent to Ship for hyphenate-limit-chars was just sent to blink-dev[1]. I assume this is something that you'll eventually get back to, but let us know if this was paused due to other concerns. Thanks!
(Also let me know if you would prefer us filing a formal position issue - seems unneeded in this case)
[1] https://groups.google.com/a/chromium.org/g/blink-dev/c/TjuGJ-8TeXk/m/X8gUvSejAwAJ
Comment 10•2 years ago
|
||
Yes, I hope to get back to it at some point, but it hasn't been a top priority; not sure when I'll find some spare cycles.
Comment 11•6 days ago
|
||
Bump. =)
Implementing this would make life a lot easier for many web editors and designers around the globe.
Comment 12•6 days ago
|
||
I'm using this definitions since years in hope that this feature some day will be implemented.
Hope this will be implemented in the future because the default hyphens: auto handling looks so terrible...
-webkit-hyphenate-limit-before: 4;
-webkit-hyphenate-limit-after: 5;
-ms-hyphenate-limit-chars: 10 4 5;
hyphenate-limit-chars: 10 4 5;
Description
•