-
Notifications
You must be signed in to change notification settings - Fork 681
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
[css-text-decor] Add auto value for text-decoration-skip: #727
Comments
auto
value for text-decoration-skip:
Yes. But in addition to the proposal, I think it should have normative text requires it to match a given value combination (presumably the current default value Actually that makes me wonder whether we actually should have a different property for ink-skip, rather than having it in the same property as other values. And also as I said in #711, the ink-skip should probably not inherit by default if we want it to apply on all types of decoration line. |
(adding myself to the conversation to keep track of progress; no strong opinion here) |
cc @litherum |
I think that if a UA wants to skip ink, it should simply add that to the UA default style sheet.
That's what UA default stylesheets are for.
See also previous comment on this:
https://www.w3.org/mid/[email protected]
https://lists.w3.org/Archives/Public/www-style/2016Dec/0088.html
Is there a problem with this approach?
~fantasai
|
I responded to the older mail thread before noticing this github thread. Reposting here. Text decoration level 4 also wants to add more than just It makes sense to me to combine the two, and aim for I think whether we should do so by having a verbose initial value, introducing an Say I want to add
Bam, I've just accidentally killed safari's by-default ink-skipping that I wasn't even aware of. Or say I go the other way around, and like safari's by-default ink-skipping and add it to my author stylesheet to do the same in other browsers. Now if/when browsers add leading-spaces and trailing-spaces to the default value, I miss out. Similarly, say I want to remove object-skipping for a particular element, I think the only precedent we have for this is the font-variant property, which is also a list of switches. If we apply the same model to text-decoration-skip, we'd have something like this (verbosity and bikesheding aside): longhands:
shorthand:
Alternatively, since we have no compat baggage to worry about and we would want authors to use these longhands to avoid the traps I mentioned at the beginning, maybe the shorthand should only have
I know that's a breaking change and the spec is already in CR, but if you all agree it's a good idea, I wouldn't feel bad about doing it given the lack of implementations. PS: the |
Note that making the L4 compound initial value easier to specify and combine with other author preferences is a different issue from whether the initial value is allowed to be a UA-dependent |
I think it is not completely independent, since the if we go along with |
No, it's independent. Altering the syntax here is a separate consideration from whether the initial value is allowed to be UA-dependent. So again, which issue is this bug about? Making it easier to specify and combine with other author preferences or allowing the UA to change the initial value rather than addressing its preferences through the UA stylesheet? |
I filed this issue with the aim of allowing a UA-dependent |
I am not in favor of different UAs having different initial values (i.e. some using I have filed a separate issue to suggest adding longhands and potentially removing all other values than |
I agree with @drott, #843 is a good issue to discuss separately. For
I think if all these observations are correct, we should:
...is this too wild? |
I was just watching this documentary about release of Netscape as Mozilla project and accidentally found out "text-decoration-skip: ink" was default behavior on those days! Does anyone remember when text renderers lost this ability and how we didn't notice? :) IMHO Apple did right thing on bringing it back and I can say having this workarounds issues like this http://crbug.com/569159 Also it is interesting for me to see "skip: ink" on several places of MIT DS course by Erik Demaine but not web browsers! |
I’d like to mention that for some scripts (namely Arabic in my case) ink skipping looks rather ugly in many fonts, specially since WebKit does not use the underline position from the fonts and uses its own hardcoded value which is rather too close to the baseline resulting in many “holes” in the underline which look rather odd (see the screenshots in w3c/alreq#86 (comment)). |
Would ink skipping still look bad if Webkit did use the underline position from the font? |
Adding a property to specify the underline position is tracked in #459, hope it resolves @khaledhosny's concern. |
It might help, but since no browser does this now one can’t be sure. IMHO it is a bit premature to change the default without considering its effect on other scripts. Just my 2¢. |
Interesting that all my insist about this 1 2 3 was actually about Arabic script. As a Safari user that uses Arabic script sites on everyday basis, IMHO, this actually helps the situation with Arabic script as without it, number of dots on some similar Arabic letters will be less distinguishable (at least with the particular fonts I've used) and I think Kahled can agree with me that with skip: ink, these two valid Persian/Arabic words will be more legible and distinguishable on small and big sizes: The actual text: سیب سببI think the situation with Safari is better and I prefer to use Safari when I use a Macbook actually. The font I used to render these is one of popular Persian web fonts, Iranian Sans that doesn't contain underline position info at all (AFAIK), I guess like many other everyday webfonts. Anyway, if Khaled don't agree with me on this, I know github.com/w3c/alreq would be a better forum to discuss about it, I couldn't register on its ML yet but I will try with another email. Obviously, I will agree with consensus of its members if they conclude web is better without |
@ebraminio they all look equally bad, IMO. I’d expect the underline to be at least below the dots. The font is not giving a good underline position either, so Firefox is not doing any better. In w3c/alreq#86 (comment) at least 3 fonts are performing good to OK with Firefox, while all fonts are performing bad with both Safari and Chrome. |
@khaledhosny Not being an arabic / persian reader, I might be wrong, but it seems to me that in the above example, while they may all be ugly, the safari variant is more legible. Ideally the line should be below the diacritics, but if the font lacks this information, ink skipping seems better for readability, no? |
The problem is that many Arabic letters descend below the base line in various ways, so a too high underline (like what Safari or Chrome draw currently) will end up too fragmented and looking ugly, the underline fragments can even get too small that they can be confused for dots or vowel marks. This is clearly seen in the Arabic part of the screenshot in #707 (comment) (it looks a bit better since the underline is in a different color, but a black underline will be much worse). I think the conclusion for CJK in #707 pretty much applies to Arabic, though for slightly different reasons. |
Again I can not agree with last sentence of Khaled here as I don't see the situation same with rectangular liking letters of CJK and I also don't think keeping the underline unchanged is equally bad or is not helpful. I hope others Arabic/Persian speakers comments would shed some light on this but I am just bringing Khaled's mentioned text on both To me, this is not very different than real world English Some other interesting to know facts, currently Arabic Wikipedia is totally disabled links hover underline for some reason but as their decision was affected Persian Wikipedia, we had to revert their change on Persian Wikipedia (there is a false fact about Amiri on the commit message, please ignore) as it was causing UI/UX inconsistency, and, Central Kurdish Wikipedia also was interested on our change so I applied that for them also. Also some Persian news agency websites like Tabnak had disabled links underline and I believe if they asked about the reason, they would mention dots legibility issue with underline as one the reason (if not top) so current situation with underline on Arabic is it self not great (I don't like here to be accused of implying that |
Ok. Now I see the issue with Khaled's given link that on that size skipped underline itself became like a dot and that made me a little undecided |
@r12a it'd be great if i18n can come to a consensus on what to do with Arabic. It looks like Arabic is a bit gray, compared to CJK, and WebKit has been shipping it for years. So while I understand there are bad cases, I can't determine whether it should skip by default or not. Note, we can give controls per script, Latin probably want always on, CJK wants always off. Arabic might want on or off by default, and a switch for opt-in/out? |
Please see #962 for the CSS property to opt-in/opt-out. Now the behavior of @ebraminio @khaledhosny thoughts? |
IMHO, the skip-ink feature may look nice to someone not familiar with the script, but it's definitely a creation for the script, and although it may looks very fancy, it's not based on existing practices and could be a totally different concept from what is already known as underline, which is to draw a line below the letters. In Arabic script, letters don't "sit" on a "baseline" (and then underline drawn under the baseline), but letters fill-in a space, a band, and the underline (overline) goes below (above) that space/band. So, "underline" does NOT strikethrough every single dot or (to put it in Latin-script definitions) hanging letters, or skip-ink at them. The position of the underline should be fixed, instead, to have minimum collision. There's plenty of evidence of this behavior in manuscripts, lithography, and movable type. We are addressing this definition/behavior in ALReq. |
What @behnam said. |
Just another IMHO I like to add, as someone reads or edits Persian Wikipedia on everyday basis on Safari, I see it a nice and helpful feature. Arabic definitely has some issues with underline, as Arabic Wikipedia has completely disabled underlining on https://ar.wikipedia.org but on Persian Wikipedia which underlining is not disabled and I can use this with Safari, this actually helps me to deal better with Arabic-script (Persian) text. I think the result of alreq eventually would be moving automatic underline position more below, so, at least, just like what Khaled said, "they all look equally bad", I don't think fixing Arabic underline issue then progressing this issue would differ much from progressing this first then fixing underline Arabic issue. |
I think a better default underline position for Arabic (if font data are to be ignored) would be just below the font descender. |
@behnam @khaledhosny So if I understand correctly, the ideal behavior for Arabic and other languages using the same script is to position the underline so that it does not intersect, making the question of whether or not to skip irrelevant since there is no intersection. The position of the underline is controlled by https://drafts.csswg.org/css-text-decor-4/#underline-offset, and the default value allows for that. It should probably be clarified to make sure that it not only allows for it, but actually requires it, or if we cannot do that, at least recommend it. Some (many) current implementations may be doing a terrible job of implementing auto correctly, and place the underline in a way that does intersect. We can hope this will go away eventually, but maybe it will take a while, and maybe there are cases where that is not possible. Also, it remains possible to place the underline manually, and make it intersect. When that happens, what should we do if the author has not said what they want in terms of ink skipping. skip by default or not? It seems to me that although avoiding intersections is the main goal, if intersections do happen, skipping ink is better than not. Does that make sense? |
@frivoal, I just posted a summary of our discussion last week here: w3c/alreq#86 (comment)
So, to answer to your questions,
Exactly!
IMHO, the If we really want to expand control over the underline/overline behavior, we should start with allowing positioning based on any of baseline, ascend, descend, and possibly other font properties. Having only two positioning options (
Yes, unfortunately.
Yes, skipping in any case of collision would be a wise choice. |
See I just filed a request to caniuse but WebKit and Blink (currently in beta) support this property. If you could see how it renders well for Arabic, that'd be helpful. Unfortunately, I can't see it working in Gecko/Edge @gregwhitworth @masayuki-nakano |
Following the discussions in [1] we propose to add the value "objects ink" to the body, html elements for the text-decoration-skip property. I interpret the thread to have reached consensus on the aspect of making ink skipping a default behavior by means of a UA stylesheet. We believe it brings better typography to the web. [1] w3c/csswg-drafts#727 (comment)
@fantasai, and others, can we come back to how to specify this default? The direction of this thread seems to indicate we want ink skipping by default. The previous suggestion had been to add such a default to the UA style sheet:
The feedback received in response to the the attempt of adding it to the UA style sheet has been that this should be a change of the initial value. So, coming back, how about changing the initial value to one of Thanks to @litherum @annevk and @tabatkins for commenting on the UA style sheet change thread. |
Yeah, @fantasai’s suggestion of a UA stylesheet value was for if a single UA wanted to do this by default. But further discussion in the thread does indeed seem to indicate that multiple browsers either already are skipping ink by default, or want to, or are okay with changing to do so. In that case, changing the initial value is the better action. Your list of suggestions is 👍 |
Hi! Sorry for not following up on this. The CSSWG discussed this issue in January, the minutes are available here: The spec was updated to move the Please let me know if this resolves the issue, or if you need something else. |
Thank you. I think we can work with the resolution in https://lists.w3.org/Archives/Public/www-style/2017Feb/0069.html which @kojiishi incorporated into L4 and the note for L3 that you quoted. |
Communities probably were not consulted to add this from the beginning as we at Persian Wikipedia had to remove this in 2013 I8168baff1b9e64d0c79dcd7a896b9cbeeed0b266 and later Central Kurdish had the same request, If55b6ea75fd2bd9e5c080d0b595a407e58d388de but now since Vector-2022, the logic doesn't work in Arabic Wikipedia anyway, compare the two links and hover links on them: * https://ar.wikipedia.org/?useskin=vector-2022&uselang=ar (default) * https://ar.wikipedia.org/?useskin=vector&uselang=ar There are also other Arabic script wikis, such as Egyption Arabic (arz) that never asked for this logic, showing more how arbitrary this logic was. And since then there were developments on the browser side as they introduced text-decoration-skip and made it the default, w3c/csswg-drafts#727 making the need for a logic that removes underline less needed. So given the developments happened on the browsers and the fact this apparently never worked in Vector-2022, let's remove this archaic and dysfunctional logic altogether. Change-Id: Id9abc470d553b03f5632e4ec957c8f1cd9843354
I'd like to pick up and second Theresa's proposal to add an
auto
value to thetext-decoration-skip.
Quoting from the original post:
A quick check in Safari shows that the value of
webkit-text-decoration-skip:
is nowauto
by default, and none disables it.The text was updated successfully, but these errors were encountered: