wobsoriano / vue-wrap-balancer

Simple Vue Component That Makes Titles More Readable.
https://vue-wrap-balancer.vercel.app
MIT License
111 stars 1 forks source link

`class` is not inherited #4

Closed lukaszflorczak closed 3 weeks ago

lukaszflorczak commented 1 year ago

It's similar to that: https://github.com/wobsoriano/vue-wrap-balancer/pull/3 and it looks like the class value is not inherited too.

Shouldn't be all $attrs bound by default?

wobsoriano commented 1 year ago

it looks like the class value is not inherited too.

Are you on Vue 2 or 3?

Screenshot 2023-01-30 at 8 22 37 AM

Shouldn't be all $attrs bound by default?

It doesn't have a root element

lukaszflorczak commented 1 year ago

Nuxt 2 + Vue 2. The reproduction is here: https://stackblitz.com/edit/github-pmz4cn-h9kozt?file=pages/index.vue. There are no id, class, or data attributes.

It doesn't have a root element

In the template? I know you create it programmatically. Vue 3 probably includes all attributes automatically by default, but Vue 2 doesn't.

Maybe this is not a big problem in a new project (although I would also prefer to avoid unnecessary element nesting, and the problem especially occurs if you need to use v-html). But I'm trying to implement a balancer in a working project, where I need to keep the existing structure and this is already a big problem.