Skip to content

Polyfill for CSS Mixins level 1, @function rule.Β #1666

@kanashimia

Description

@kanashimia

What would you want to propose?

Spec: https://www.w3.org/TR/css-mixins-1/
This one would be pretty useful and should be easy to polyfill.
Currently available in Chromium for testing.

Suggested solution

To implement this plugin one has to do something as follows:
Inline function contents, mangle local variable names, remember to handle inline media queries and nested function calls.

Additional context

Some examples:
https://una.im/5-css-functions/

With regards to how it resolves variables it is slightly weird.
Spec is in the early stages, I'm sure it will change in the future.

Validations

  • Follow our Code of Conduct
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this feature?

  • I'm willing to open a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions