Skip to content

[css-mixins-1] Mixins can be called (but not defined) without params #13015

@andruud

Description

@andruud

It's mildly annoying that you can invoke a mixin without a parameter list (@apply --m), but defining a parameter-less mixin requires an explicitly empty list (@mixin --m()).

It seem more civilized to either make the parameter list optional on the defining side as well, or require () when applying a mixin with no parameters.

If mixins are indeed going to gain a stronger underlying connection to custom functions (#12927), then I'd slightly prefer to just always require (), but I'm happy enough as long as we achieve some "symmetry" between @apply and @mixin.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions