csstools / csstools/postcss-plugins

Polyfill for CSS Mixins level 1, `@function` rule.

Open
#1,666 5 comments 6 reactions 0 assignees View on GitHub
feature request
Dominant language
CSS
Stars
1.1k
Forks
83
Avg merge
10h 16m
Merged PRs (30d)
16

Description

### 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

- [x] Follow our [Code of Conduct](https://github.com/csstools/postcss-plugins/blob/master/CODE_OF_CONDUCT.md)
- [x] 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.