You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-text] Consider removing distribute value for text-justify from the spec #7322
For legacy reasons, UAs must also support the alternate keyword distribute which must compute to inter-character, thus having the exact same meaning and behavior.
Looking at browser support for text-justify:
Chrome only supports the property behind the experimental web features flag
IE (which used to support this value) is now retired
Safari has never shipped text-justify
...which leaves Firefox being the only browser supporting the CSS property.
I suggest that we remove this note from the spec, since there is no clear win in web compatibility in supporting this.
Note that justification doesn't break pages in the way that, say, a layout bug would, so the compat impact of not having this value is going to be less than breaking/dropping any kind of layout behavior. But it's also very cheap to implement, being just an alias.
This value was in a CR-level spec in the past and supported by the most dominant browser of the time, so I'm hesitant to drop it if there's not either a compelling reason or substantial proof that it's not used by some long tail of existing CJK content. https://www.w3.org/TR/2003/CR-css3-text-20030514/#justification-prop
Note that justification doesn't break pages in the way that, say, a layout bug would, so the compat impact of not having this value is going to be less than breaking/dropping any kind of layout behavior. But it's also very cheap to implement, being just an alias.
The spec (and relevant WPT) specifies it as a parse-time alias, which while not hard to implement, complicates the code unnecessarily, since WebKit does not have such a mechanism (you need to create a custom parsing method, and can't re-use the fast paths). Compute-time is fine though I don't see the benefit of supporting it. Fwiw, Chrome only implements it compute-time.
Hi @nt1m
We resolved to keep the distribute value in the spec, but it can be implemented either by computing to inter-character (which Chrome) or by treating it as a parse-time alias (as Gecko does). Would appreciate if you can confirm this is acceptable to you.
Activity
nt1m commentedon May 27, 2022
cc @emilio @dbaron Wdyt?
nt1m commentedon May 27, 2022
cc @karlcow @miketaylr too
fantasai commentedon May 31, 2022
Note that justification doesn't break pages in the way that, say, a layout bug would, so the compat impact of not having this value is going to be less than breaking/dropping any kind of layout behavior. But it's also very cheap to implement, being just an alias.
This value was in a CR-level spec in the past and supported by the most dominant browser of the time, so I'm hesitant to drop it if there's not either a compelling reason or substantial proof that it's not used by some long tail of existing CJK content. https://www.w3.org/TR/2003/CR-css3-text-20030514/#justification-prop
fantasai commentedon May 31, 2022
CC @kojiishi
karlcow commentedon May 31, 2022
Following the discussion in #6156
text-justify: inter-characterandtext-justify: distribute. This has shipped in Firefox 89.text-justify: distributelacking in a web page.nt1m commentedon May 31, 2022
The spec (and relevant WPT) specifies it as a parse-time alias, which while not hard to implement, complicates the code unnecessarily, since WebKit does not have such a mechanism (you need to create a custom parsing method, and can't re-use the fast paths). Compute-time is fine though I don't see the benefit of supporting it. Fwiw, Chrome only implements it compute-time.
Unprefix -webkit-text-justify and add inter-character value
Unprefix -webkit-text-justify and add inter-character value
kojiishi commentedon May 31, 2022
Edge has degraded this when it moved to Chromium. If Edge is fine, I think it's a good sign we can remove this safely. /cc @dlibby-
19 remaining items
[css-text-4] Allow distribute to be a legacy value alias #7322
frivoal commentedon Dec 28, 2022
Hi @nt1m
We resolved to keep the
distributevalue in the spec, but it can be implemented either by computing tointer-character(which Chrome) or by treating it as a parse-time alias (as Gecko does). Would appreciate if you can confirm this is acceptable to you.nt1m commentedon Dec 28, 2022
Should probably be fine to keep it.
frivoal commentedon Dec 29, 2022
tested by web-platform-tests/wpt#37692
[css-text-3] Allow distribute to be a legacy value alias w3c#7322
[css-text-4] Allow distribute to be a legacy value alias w3c#7322