-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should <ins> and <del> have unicode-bidi: isolate
?
#5611
Comments
I don't like the fact it will make shaping to break for example in https://jsbin.com/katocurewu/edit which can be considered superfluous as I hadn't experience with something like that as MediaWiki doesn't have character by character diffs, but hmm, using a template coincidentally I've made for Wikimedia Commons here (broken in Mozilla, see this one in Chrome) it isn't that superfluous now I think more, but your case is also relatable, maybe something shouldn't UA stylesheet handle automagically however. |
It's not just shaping that breaks, this could also break things like bidi mirroring (well, arguable that's a form of shaping, perhaps). Consider https://codepen.io/jfkthame/pen/zYrGbPo for example: applying A better solution for the reported chromium issue would be to use ::before and ::after to insert ZWNJ each side of the |
|
@aharon-lanin I suspect you might have missed that this is the repository to discuss changes to that standard. 😉 |
Indeed! LOL. Of course I knew that, and just wanted to score brownie points by pointing out the importance of standards compliance :) |
Thank you for all the feedback. With the feedback, I added some more test cases: https://jsbin.com/vebabex/edit?html,output Without knowing what's more natural to bidi users, some seems to be more reasonable with @jfkthame Bidi mirroring is a good point we should also consider. If the consensus is not to add How does people think on @aharon-lanin's idea to add only to |
I can see how it'd make sense in some cases, at least, but I'm not sure it's universally good, and I'm uneasy about So at the moment, my feeling is that all these ideas are things that an author could specify if they're considered suitable for their use case, but not put into the default stylesheet. |
Found an interesting test case using Fira Code: |
Note that treating del as an isolate, but not treating ins as an isolate,
as I suggested, would also fix this test case.
…On Wed, Jun 24, 2020 at 2:33 PM Koji Ishii ***@***.***> wrote:
Found an interesting test case using Fira Code:
https://jsbin.com/dupelal/edit?html,output
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5611 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIUIRGMGWF3TKPEOLX5NRTRYHP73ANCNFSM4NXMBY3Q>
.
|
As would inserting a control using (As it happens, inserting ZWNJ doesn't actually work with Fira Code; its "ligature" rules don't respect this. But other options such as ZWSP or Word Joiner do work to block it.) |
Generally speaking, when x should not affect the display of the surrounding
text, you do not want it to affect it by ligating with surrounding text or
by bidi effects. Using ZWNJ (or whatever) prevents ligatures, but it does
*not* prevent bidi effects. On the other hand, unicode-bidi:isolate, as
implemented on the main browsers, does prevent ligatures. According to
my first statement, that is beneficial, generally speaking. Nevertheless,
from a purist point of view, unicode-bidi:isolate was never intended to
affect ligatures, and that it does at first comes as a surprise. Browsers
could, in principle, also change their behavior in this respect as long as
the correct behavior isn't specified.
Thus, once again from a purist point of view, wherever we have
unicode-bidi:isolate by default, putting something explicit to prevent
ligatures would also make sense.
Putting something that prevents ligatures without unicode-bidi:isolate is
not a good idea.
…On Wed, Jun 24, 2020 at 3:51 PM jfkthame ***@***.***> wrote:
As would inserting a control using del::before and del::after to block
the ligation.
(As it happens, inserting ZWNJ doesn't actually work with Fira Code; its
"ligature" rules don't respect this. But other options such as ZWSP or Word
Joiner do work to block it.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5611 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIUIRDTUINK3CJ56ZENZ3LRYHZFLANCNFSM4NXMBY3Q>
.
|
FWIW, I agree with @jfkthame’s points here, and would also recommend no change to the spec. |
How about adding
unicode-bidi: isolate
to<ins>
and<del>
in the default UA stylesheet?Test: https://jsbin.com/vebabex/edit?html,output
When crbug.com/1053838 mentioned about
<ins>f</ins>i
forming a ligature, I remember we have appliedunicode-bidi: isolate
to string literals in our code search site to fix undesired reordering, and I wonder the same should apply to<ins>
and<del>
too.If this is a good change for bidi, #5594 confirmed that
unicode-bidi: isolate
should isolate font shaping from surrounding context, so I think doing this can solve both issues.Thoughts?
/cc @r12a @upsuper @jfkthame @litherum
The text was updated successfully, but these errors were encountered: