Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New keyword: single-arg #162

Merged
merged 6 commits into from Mar 4, 2024
Merged

Conversation

pciarach
Copy link
Contributor

@pciarach pciarach commented Mar 4, 2024

Introduced single-arg keyword to allow passing comma-separated CSS values as mixins' arguments

…CSS values as mixins' arguments

- Included prettier version in the dev dependencies for the formatting consistency
@pciarach
Copy link
Contributor Author

pciarach commented Mar 4, 2024

Hi @ai, I've created PR as we discussed in #161.

As I was always using mixins defined inside CSS files so I'm not super experienced with the other options and possible cross-interactions. I've tried to include some of them in the test cases but let me know if you can think of any others.

README.md Outdated
### Comma-separated CSS values

In order to pass a comma-separated value as a argument to a mixin, you can use
the special `asSingleArg` keyword. For example:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other names that I came up with while coding:

  • single-arg
  • mixinArg
  • mixin-arg

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think CSS code style is more about single-arg

camelCase is very rare.

.gitignore Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@pciarach pciarach changed the title New keyword: asSingleArg New keyword: single-arg Mar 4, 2024
@ai ai merged commit 5a288dd into postcss:main Mar 4, 2024
4 checks passed
@ai
Copy link
Member

ai commented Mar 4, 2024

Thanks. Released in 10.0.

@pciarach
Copy link
Contributor Author

pciarach commented Mar 4, 2024

Thank you for the help and review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants