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

Working with components using splat attributes #116

Closed
josemarluedke opened this issue Sep 26, 2018 · 3 comments
Closed

Working with components using splat attributes #116

josemarluedke opened this issue Sep 26, 2018 · 3 comments
Labels

Comments

@josemarluedke
Copy link

Hey there! Thanks for this awesome project.

I was hoping to use this project in combination with Angle Brackets Components and the splat attributes (...attributes) feature from Ember v3.4. In my tests, it doesn't seem to work as one would expect.

Here is my attempt:

//my-component.hbs

<div
  class="my-component"
  local-class="my-local-class"
  ...attributes
>
  This is my-component
</div>
// application.hbs

<MyComponent class="my-called-class" />

The current behavior is: No class end up in the HTML:

<div class="my-called-class">
  This is my-component
</div>

Expected behavior, all the classes would be present:

<div class="my-component _my-local-class_167kj3 my-called-class">
  This is my-component
</div>

Note, if I remove the ...attributes from the component, css-modules will add the correct local class.

My test project can be found here: https://github.com/josemarluedke/--css-modules-test

@dfreeman dfreeman added the bug label Sep 26, 2018
@dfreeman
Copy link
Member

Thanks for the report, @josemarluedke! I think there's some special casing around how class works with ...attributes, and it may be that we're doing something that doesn't play nicely with that.

I can't make any promises, but I'll try and dig into this soon to understand what's happening and hopefully put a fix together 🙂

@dfreeman
Copy link
Member

@josemarluedke I just released v1.0.1, which should fix this issue

@josemarluedke
Copy link
Author

@dfreeman Awesome! I just tested it out and it works as expected.

Thank you for taking the time to fix this.

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

No branches or pull requests

2 participants