Skip to content

Compatibility with the CSS custom function and mixin proposal #3787

@stof

Description

@stof

@mirisuzanne is working on a proposal for CSS custom functions and mixins at https://css.oddbird.net/sasslike/mixins-functions/

The suggested syntax uses @function and @mixin, which are the same at-rules than Sass, and so would clash with it right now.

The CSS proposal requires CSS custom functions and mixins to use dashed-ident, i.e. an identifier starting with --, to avoid clashes with built-in CSS functions (which never start with --).
However, Sass currently allows defining function and mixin names starting with --, as shown in https://sass-lang.com/playground/#eJwzNHRIK81LLsnMz1PQ1S1JLS5R0NBUqOZSUHAoSi0pLcpTUE9Wt+aq5eJyyM2syIQpMoKpSrFSSAVLJ4K5SVZQBRqa1iAzMvOSc0pTUmG6gCoBJ/UfhA==

Should we deprecate defining Sass members named using dashed-ident to reduce the risk of clashes with CSS ?

Metadata

Metadata

Assignees

Labels

CSS compatibilitySupport the CSS specenhancementNew feature or requestplannedWe would like to add this feature at some pointrequires deprecationBlocked on a deprecation cycle

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions