Skip to content

Vue component classes overriden by end-user specified classes in Markdown page #831

Closed
@Tenrys

Description

@Tenrys

Version

@nuxt/content: 1.10.0
nuxt: 2.14.7

Reproduction Link

https://codesandbox.io/s/romantic-fermat-c3t5g
https://github.com/marceau-maubert/nuxt-content-component-class-override-bug

Steps to reproduce

Create a Vue component that has CSS classes set on its root element, and register it globally in Vue so the Nuxt Content component can make use of it in our page.

Try to add additional CSS classes to the component when using it in a Markdown page via the class attribute.

What is Expected?

The CSS classes should merge with the additional ones specified in the Markdown page.

What is actually happening?

The CSS classes will get overridden with the ones specified in the Markdown page.

It might be safe to assume something similar might happen with the style attribute, but I haven't tried it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions