Skip to content

Default theme: Add class to opt out of .vp-doc styles #4731

Closed
@DaRosenberg

Description

@DaRosenberg

Is your feature request related to a problem? Please describe.

When adding Vue components or HTML markup inside a doc or page markdown file, it's frustrating to have to contend with the global .vp-doc styles.

Describe the solution you'd like

It would be very nice to have a .not-vp-doc class to negate and opt out of the global .vp-doc styles (for the element where you apply .not-vp-doc and all descendants) similar to the .prose and .not-prose classes used by @tailwindcss/typography.

Describe alternatives you've considered

I started creating my own override vp-doc.css stylesheet, but maintaining it and also getting it imported instead of the default one requires too much duplication files of the default theme.

I also considered mechanisms to opt out of the .vp-doc styles at the theme level in Layout.vue but it really doesn't solve the problem - the opt-out needs to be able to happen on a specific fragment or component when embedded inside an .md file that otherwise consists primarily of markdown content.

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions