Skip to content

[css-mixins-1] Auto-wrap mixin body in @result if omitted? #13524

Description

@andruud

As discussed in #13138 and also #12927, several people (perhaps most vocally @LeaVerou) felt that requiring an explicit @result rule was too "noisy":

@mixin --greenify() {
  @result {
    color: green;
    background: lime;
  }
}

Should we then make @result optional, by treating a mixin body absent of any @result rules as implicitly wrapped in @result?

The following would then be equivalent to the first example:

@mixin --greenify() {
    color: green;
    background: lime;
}

I would prefer if we did require @result, but I'd much rather do an implicit auto-wrap than consider @local again (see #13138 (comment)).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Wednesday afternoon
    Status
    Agenda+ FTF

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions