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-lists][css-counter-styles] Define which symbols are not affected by font-family, and how exactly #6201
<!-- AdobeBlank defined in https://github.com/adobe-fonts/adobe-blank/blob/master/adobe-blank.css --><olstyle="font-family: AdobeBlank"><listyle="list-style-type: decimal">1.</li><listyle="list-style-type: circle">◦</li></ol>
Then the font displays both 1. of the ::marker and text node as blank.
But in the 2nd item, we still see the ◦ of the ::marker, only the text node is blank.
So reading the specs I would guess that the ◦ should disappear too, but that's probably bad for compat.
So I think the specs should define what exactly happens. Implementations haven't been much consistent in the details:
Is it just for list-style-type set to disc, circle, square, disclosure-open, disclosure-close? What if their definition is changed using @counter-style?
Alternately, a browser may render these styles using a browser-generated image instead of the defined character.
So browsers can do that to avoid changing the symbol depending on the font. But I guess we still need to decide what should happen if browser use actual text from the @counter-style "normative definition".
If there's a compat reason to restrict these keywords to browser images or browser-chosen fonts, we can do that. If there isn't, then maybe it's fine as-is?
@MatsPalmgren@faceless2 Can you look over @Loirooriol's questions and clarify what you think we should spec here? It seems there are several options:
Allow the font-family to influence ::marker as normal for text and numeric counters, but ensure that the system fallback hits a font with the correct glyphs for the shapes.
Set up the shape keywords specifically to perform lookup against the UA-chosen font.
Set up ::marker in general to perform lookup against the UA-chosen font for the characters we use for predefined shapes, falling back to the inherited font for other characters, maybe via some kind of special font-family keyword.
A remaining case is content: counter(c, circle). It uses the circle style itself, so it may be expected to use the special rendering of list-style-style: circle. But used in content means that you can mix it with other text, which seems unnecessarily tricky for implementations. So I wouldn't inherit the special rendering, just like for counter styles extending symbolic ones.
I guess we can infer from 2 that things like these don't magically obtain the special rendering of circle:
I don't understand what you mean by this example, there's nothing about it that invokes circle at all.
A remaining case is content: counter(c, circle). It uses the circle style itself, so it may be expected to use the special rendering of list-style-style: circle. But used in content means that you can mix it with other text, which seems unnecessarily tricky for implementations. So I wouldn't inherit the special rendering, just like for counter styles extending symbolic ones.
Sounds right, tho that case should already work today, right?
I don't understand what you mean by this example, there's nothing about it that invokes circle at all.
circle just an example. Same for all other symbolic counter styles, replacing "◦" with the corresponding character.
Sounds right, tho that case should already work today, right?
Yes, Chromium and Firefox don't use the special rendering when using content on a ::before, ::after or ::marker. Same for WebKit on ::before and ::after (it doesn't support content on ::marker).
Are you trying to imply that any counter style resembling the predefined symbolic's definition would get the same magic exception allowing for special drawing?
Yes, Chromium and Firefox don't use the special rendering when using content on a ::before, ::after or ::marker. Same for WebKit on ::before and ::after (it doesn't support content on ::marker).
Okay, explicit exception put in for the predefined symbolics, extending the existing "you can use an image" to be "or a UA-chosen font, if you're actually rendering text".
The behavior of extending the predefined symbolics was handled in #3584; the behavior of any other counter style using the same characters doesn't need any tweaking or clarification because nothing implies they're special at all.
Are you trying to imply that any counter style resembling the predefined symbolic's definition would get the same magic exception allowing for special drawing?
The opposite, I'm saying that we can discard that possibility.
Activity
Loirooriol commentedon May 3, 2021
OK, I missed this text in https://drafts.csswg.org/css-counter-styles-3/#simple-symbolic
So browsers can do that to avoid changing the symbol depending on the font. But I guess we still need to decide what should happen if browser use actual text from the
@counter-style"normative definition".fantasai commentedon May 13, 2021
If there's a compat reason to restrict these keywords to browser images or browser-chosen fonts, we can do that. If there isn't, then maybe it's fine as-is?
Loirooriol commentedon May 13, 2021
Yes, it seems there are compat reasons for using either browser images or browser-chosen fonts, at least in common cases.
@MatsPalmgren is working on replacing the browser images with actual text in Firefox, and seemingly this will require using a
-moz-bullet-fontfont.And in #6200 (comment), @faceless2 said:
fantasai commentedon May 13, 2021
@MatsPalmgren @faceless2 Can you look over @Loirooriol's questions and clarify what you think we should spec here? It seems there are several options:
font-familykeyword.Loirooriol commentedon Jun 3, 2021
OK, so per resolutions in #3584 (comment),
I guess we can infer from 2 that things like these don't magically obtain the special rendering of
circle:A remaining case is
content: counter(c, circle). It uses thecirclestyle itself, so it may be expected to use the special rendering oflist-style-style: circle. But used incontentmeans that you can mix it with other text, which seems unnecessarily tricky for implementations. So I wouldn't inherit the special rendering, just like for counter styles extending symbolic ones.tabatkins commentedon Jun 3, 2021
I don't understand what you mean by this example, there's nothing about it that invokes
circleat all.Sounds right, tho that case should already work today, right?
Loirooriol commentedon Jun 3, 2021
circlejust an example. Same for all other symbolic counter styles, replacing"◦"with the corresponding character.Yes, Chromium and Firefox don't use the special rendering when using
contenton a ::before, ::after or ::marker. Same for WebKit on ::before and ::after (it doesn't supportcontenton ::marker).tabatkins commentedon Jun 3, 2021
Are you trying to imply that any counter style resembling the predefined symbolic's definition would get the same magic exception allowing for special drawing?
I'm not sure where you'd infer that from.
tabatkins commentedon Jun 3, 2021
Right, that'll be an edit on Lists tho.
[css-counter-styles-3] Allow UAs to render the symbolic styles in a U…
tabatkins commentedon Jun 4, 2021
Okay, explicit exception put in for the predefined symbolics, extending the existing "you can use an image" to be "or a UA-chosen font, if you're actually rendering text".
The behavior of extending the predefined symbolics was handled in #3584; the behavior of any other counter style using the same characters doesn't need any tweaking or clarification because nothing implies they're special at all.
fantasai commentedon Jun 4, 2021
Also restricted such special rendering to 'list-style-type'.
Loirooriol commentedon Jun 4, 2021
The opposite, I'm saying that we can discard that possibility.