-
Notifications
You must be signed in to change notification settings - Fork 672
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-counter-styles] counter-style square symbol (0x25FE) is bad #6200
Comments
This could also be prevented with
|
Right, but I still think choosing a different code point would be better since it's rare that fonts have a glyph for 25FE so it would use a fallback font. And even when it is supported, e.g. STIXGeneral and DejaVu fonts, 25FE is much larger than |
We've come at this from the other direction, trying to build list markers based on ::marker, but without a legacy implementation. We independently came to the conclusion U+25AA was the best option - and that the existing value of U+25FE was clearly nominal, as no-one has ever used it to render "square". So we'd support this proposal. It's also clear that an internal font is the only way to do this, and that's also the route we took. So the exact choice of glyph is fairly arbitrary - it's only ever going to be an issue if the user sticks with |
Chrome apparently favors U+25A0 ■︎ and has this annotation in
|
@Crissov However, note that Chromium doesn't paint normal native symbol markers as text. U+25A0 is just for things like @faceless2 If an internal font is the only way, then it should maybe be defined in the spec. Chromium doesn't treat symbols as text, which implies that things like But not sure if I understand the font approach, is it like |
I am more than happy to change that to whatever looks reasonable; I just grabbed a good-looking square at the time. I see that it does indeed render as an emoji now; either it didn't in the past, or the font stack used at https://www.fileformat.info/info/unicode/char/25FE/index.htm just causes the non-emoji rendering. Looking over y'all's suggestions, 25AA does indeed seem to be a great square, with appropriate sizing and line positioning. |
Agenda+ to confirm swapping out ◾ (U+25FE) for ▪ (U+25AA); I need a resolution since this spec is in CR. ^_^ |
Gosh dang it, GitHub swaps both characters out for emoji variants, so it's not clear how 25AA is better here. |
Yes I agree, for the general case. We do this with magic when we have @font-face {
font-family: -vendor-marker-font;
unicode-range: U+2022, U+25A0;
}
::marker {
font-family: -vendor-marker-font, inherit(font-family); /* note */
} You can be sure I'll be checking Mats' UA stylesheet when it's out though to see if he's got any better ideas, but it feels like there will need to be some special casing for compat whatever we do.
It sort of is already - the text says @tabatkins the two look different on macOS Safari, although TBF I need to squint a bit... (*note - idea from #2864, not sure I've got it right but the intent should be clear.) |
Yeah, the two GH emoji are different, but only barely, and importantly since they're both images they're both black squares when shown in dark mode, as I have my GH switched to, which avoiding that was one of the reasons to make this switch in the first place. :/ (But since U+2faa is not an emoji in actuality, it should be fine in practice.) |
This seems needed for compat but I don't see it in css-lists nor css-counter-styles. So I have filed #6201 to discuss since probably it's off-topic here. |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-counter-styles] counter-style square symbol (0x25FE) is bad<dael> github: https://github.com//issues/6200 <dael> TabAtkins: One of the easy cases we need tor esolve on <dael> TabAtkins: Count spec says build in square rendes something like 25FE codepoint. Problem is that has emoji presentation. Presents as an emoji rather than a character with text color <dael> TabAtkins: Also apparently a little larger <dael> TabAtkins: Suggestion of better character <dael> TabAtkins: 25aa <dael> TabAtkins: Switch in spec to 25aa which is not emoji so renders more correct and better size <dael> TabAtkins: GH treats 25aa as an emoji which is not what borwsers do. Confusing but should be fine in practice. <dael> Rossen_: Any other ideas of a character? If not, objections? <dael> RESOLVED: Switch to using 25aa |
…truction for list-style-type/list-style-image ::markers. r=emilio The change from 0x25FE to 0x25AA for list-style-type:square was approved here: w3c/csswg-drafts#6200 (comment) Differential Revision: https://phabricator.services.mozilla.com/D111691
…truction for list-style-type/list-style-image ::markers. r=emilio The change from 0x25FE to 0x25AA for list-style-type:square was approved here: w3c/csswg-drafts#6200 (comment) Differential Revision: https://phabricator.services.mozilla.com/D111691
…truction for list-style-type/list-style-image ::markers. r=emilio The change from 0x25FE to 0x25AA for list-style-type:square was approved here: w3c/csswg-drafts#6200 (comment) Differential Revision: https://phabricator.services.mozilla.com/D111691
…truction for list-style-type/list-style-image ::markers. r=emilio The change from 0x25FE to 0x25AA for list-style-type:square was approved here: w3c/csswg-drafts#6200 (comment) Differential Revision: https://phabricator.services.mozilla.com/D111691
This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0
This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0
This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3094428 Reviewed-by: Dominik Röttsches <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#912123}
This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3094428 Reviewed-by: Dominik Röttsches <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#912123}
This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3094428 Reviewed-by: Dominik Röttsches <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#912123}
… to WPT tests, a=testonly Automatic update from web-platform-tests Convert beforeSelectorOnCodeElement.html to WPT tests This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3094428 Reviewed-by: Dominik Röttsches <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#912123} -- wpt-commits: d3aec8ca81b88ab6bacf672a125dea23edc1e001 wpt-pr: 30031
… to WPT tests, a=testonly Automatic update from web-platform-tests Convert beforeSelectorOnCodeElement.html to WPT tests This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3094428 Reviewed-by: Dominik Röttsches <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#912123} -- wpt-commits: d3aec8ca81b88ab6bacf672a125dea23edc1e001 wpt-pr: 30031
This test was originally added for WebKit's bug 11197 [1] [2] as a crash test. It is not clear whether a pixel test was needed to check visual rendering but the description of the test suggests it is also testing the circle before and the square after. This test was later tweaked several times with some font-related rules to keep ensuring it matches the pixel expectation, leading for example to the introduction of the non-standard value '-webkit-monospace' that is intended to be removed [3] or of a workaround for bug [4] that is actually fixed now. This CL upstream the original test to WPT as a crash test. It also converts the visual part of the testing to a reftest. However, because Chromium does not render counter-style "square" as specified, the test remains internal for now [5]. Bug: 1065468 [1] https://bugs.webkit.org/show_bug.cgi?id=11197 [2] https://source.chromium.org/chromium/chromium/src/+/2203391429cd40f45325c1d275209c84b5c0dc57 [3] https://crbug.com/1065468 [4] https://crbug.com/939823 [5] w3c/csswg-drafts#6200 Change-Id: I70e489e6824c9afed1087b23ecee27c1bb861dc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3094428 Reviewed-by: Dominik Röttsches <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/master@{#912123} NOKEYCHECK=True GitOrigin-RevId: 94e222dde3f73e1e48332eabcb03a91ae14bb6d4
CSS Counter Styles Level 3 says:
Unicode code point 25FE has
Emoji_Presentation=Yes
:https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
This has the effect that a compliant UA will try to find a glyph for it from a color-emoji font rather than the current default text font, which leads to the following problems:
list-style-type: disc/circle
(see this testcase for some examples - 25FE is the third character from the left)
Currently, many UAs render
list-style-type: square/disc/circle/...
using custom non-standard methods (typically a special internal box type) so the above is a minor problem. However, we're changing Gecko to use generated text per the CSS Counter Styles spec instead, which makes this a major problem: the rendering for 25FE is so ugly that it's unshippable for this use. (Point 1 above can also lead to the glyph being invisible when the background is black.)So I think this symbol needs to be changed to something else... I've tested the filled squares in Geometric Shapes code block with many different fonts and it appears 25AA would be the best choice. It's rendered in the foreground color and it's similar in size and alignment to
disc/circle
(2022/25E6). It also appears to be supported by most common fonts. (25AA is the second character from the left in the testcase mentioned above)(Fwiw, even with the above change the default rendering is still too ugly in some fonts for us to ship that as the default rendering. So we'll use an internal font for these counter styles by default (that makes it very close to our current legacy rendering), but we'll let authors override that with a font of their choice if they want to.)
The text was updated successfully, but these errors were encountered: