Open Bug 1521723 Opened 6 years ago Updated 6 days ago

Implement the hyphenate-limit-chars property

Categories

(Core :: Layout: Text and Fonts, enhancement, P3)

66 Branch
enhancement

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:

  1. Use CSS Hyphenation for a sentence
  2. Find out that it is also uses Hyphenation for very short words
  3. 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.

I've moved the bug to a new component and the guys from there will bet an idea of what should o whit this.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: feature
Priority: -- → P3

Hmm, well, is this in any spec?

Hi do we have any news? Will this property be implemented soon?

kind regards

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.

It's really annoying that this feature still doesn't exist in 2022.

Agreed. I can't believe there is so little innovation in the area of hyphenation.

Severity: normal → S3

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

Flags: needinfo?(jfkthame)

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.

Flags: needinfo?(jfkthame)

Bump. =)

Implementing this would make life a lot easier for many web editors and designers around the globe.

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;

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: