Re: [css-counter-styles] Any chance of requiring a -- prefix on the names?

On Wed, Feb 24, 2016 at 12:19 PM, François REMY
<francois.remy.dev@outlook.com> wrote:
> How about a proposal to unify them with how font-family works, then?
> Tab seemed to agree this would solve his issue as well, and that would solve the initial problem of the originating thread, too.
>
> The idea would be to make those properties (animation-name, transition-property, counter-style, font-family, etc...) accept quoted "identifier" or bare identifier if identifier does not start with two dashes.

No. <family-name> is way more complicated than <custom-ident>, and
doesn't actually solve any issue, as it still allows arbitrary
identifier being there.

> Details are there:
> http://www.w3.org/mid/CAAWBYDDwnH+0mZR9DCoLkHvX0AnYCewjU95qpi8V2c60nER+yQ@mail.gmail.com

Tab said "strings work", not <family-name>s work. Actually, in this
specific case, strings do not work either, because list-style-type
accepts <string> in addition to <counter-style>.

On Wed, Feb 24, 2016 at 5:42 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> Currently, only Firefox implements @counter-style, but it's been
> implemented since v33 afaict.  Does anyone (Xidorn?) know the usage
> here, and is able to comment on whether such a change would be
> feasible?

I don't believe it is widely-used yet, given Firefox is the only impl,
and other vendors don't even show interest in implementing this. It
means anyone depends on this feature has to add polyfill anyway. The
main use case should be for minority languages, which wouldn't show a
significant usage number I suppose. I don't have data, though.

> I noted in a recent thread that the allowed name syntax for
> @counter-style rules was a mistake - allowing them to fill the same
> namespace as normal keywords meant I have to keep an (updated) list of
> disallowed keywords, and do some funky things in the spec to handle
> collisions with existing names.  If I'd written the spec today, I'd
> have required that the name be a <custom-ident> and start with --, so
> it's easily distinguishable from anything else.

Given it has been implemented and documented, I'd prefer to keep it
as-is, unless any other implementor shows interest in implementing and
prefers the other way. It may be a good idea if we have this
restriction at the very beginning, but I'm not convinced it's worth
investing resources on changing existing code and docs at this point.

I don't think this issue is very important for @counter-style, given
the keywords involving here is very few (inside, outside, and CSS-wide
ones), and new keywords in the future don't have a high chance to
conflict with an average counter style name.

- Xidorn

Received on Wednesday, 24 February 2016 06:41:12 UTC