-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Alternative syntax for &attributes
#1744
Comments
+1 for |
The problem is that:
|
Lets copy jsx & ES7 object spread here and add support something like: h1.foo(data-a="b" ...({'data-b': 'c'})) Lets make the new We can then support a special "unescaped" version that could be something like: h1.foo(data-a="b" ...!({'data-b': 'c'})) or alternatively (preferably) track when the values are already coming from the |
I'm reassigning this to 3.0.0 since 2.0.0 is about to be published and this is not top-priority. |
I think the It would be cool if mixins could use
Sooo much better than:
|
@aleclarson I think I'd be happy with that. We could make: mixin test
div(...) effectively a shorthand for: mixin test
div(...!attributes) The |
Hello, @ForbesLindesay I'm starting in open-source contributions and I would like to contribute to this issue. I'll appreciate it if you can provide me with architectonical guidelines! |
I tend to use the
&attributes
syntax quite often,and think it is kind of verbose. The
&
token does not seem to beused for anything else right now, so would not it be possible
to use an alternative syntax such as
A small change to the lexer should be sufficient. Modifying
attributesBlock
as follow works and passes all the tests.
If you have any interest in this proposition, I'm up for testing this feature
and sending a PR.
Thanks.
The text was updated successfully, but these errors were encountered: