postcss / autoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use
https://twitter.com/autoprefixer
MIT License
21.57k stars 1.25k forks source link

Support hyphenate-limit-chars #1483

Open yisibl opened 1 year ago

yisibl commented 1 year ago

Spec: https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-limit-chars

IE:

https://msdn.microsoft.com/en-us/library/hh771865(v=vs.85).aspx

-ms-hyphenate-limit-chars: auto | <integer> {1,3}

Safari

Safari support the -webkit-hyphenate-limit-before, -webkit-hyphenate-limit-after and -webkit-hyphenate-limit-lines properties

Chrome

WIP https://bugs.chromium.org/p/chromium/issues/detail?id=924069 https://groups.google.com/a/chromium.org/g/blink-dev/c/CwUy1UoqyVQ

ai commented 1 year ago
  1. Can you explain how to convert standard property to Safari’s one?
  2. Does IE and standard property have the same values?
yisibl commented 1 year ago

I am also not familiar with this property and need further investigation by the implementer.

r-thomson commented 1 year ago
  • Can you explain how to convert standard property to Safari’s one?

I believe that the second and third arguments for hyphenate-limit-chars map to -webkit-hyphenate-limit-before and -webkit-hyphenate-limit-after, respectively.

The first value is the minimum word length before words should be hyphenated. The second value is the minimum number of characters before the hyphen. The minimum number of characters after the hyphen will be set equal to the second value.