`)\r\n\r\nI'm currently working on migrating and documenting the excellent Spectre CSS docs and am using Vitepress.\r\n\r\nI'm developing an ejected and modified default theme which has already come some way to solving this problem:\r\n\r\n- [original](https://picturepan2.github.io/spectre/components/menu.html) (custom app)\r\n- [migrated](https://spectre-org.github.io/spectre-docs/docs/components/menu.html) (VitePress with modified default theme)\r\n - note the `vp-doc` formatting which is all Spectre CSS\r\n - some fixed, and some not-yet fixed clashes of general class names\r\n\r\nFor reference to the use case (documenting a 3rd-party framework) here is the raw markdown page:\r\n\r\n- https://raw.githubusercontent.com/spectre-org/spectre-docs/main/docs/components/menu.md\r\n\r\nNote that:\r\n\r\n- Spectre CSS (or any other 3rd-party CSS framework) is now able to be simply \"dropped in\"\r\n- there is no pollution between VitePress and the 3rd-party framework\r\n- VitePress' default components remain fully-styled and work as they were before\r\n- `vp-doc` content can be safely used to demo any 3rd party HTML elements and classes\r\n\r\nI think I know enough to fix the problems in my modified theme and either:\r\n\r\n- publish a new \"neutral\" theme\r\n- port the changes to the default theme (ideal outcome)\r\n\r\nThere's actually not that much work; it's:\r\n\r\n- renaming the general component classes\r\n- moving some `vp-doc` classes to other locations\r\n- creating an additional unstyled entrypoint such as `without-formatting`\r\n\r\n### Describe alternatives you've considered\r\n\r\nPublishing the modified theme standalone, but then of course it would not benefit from ongoing updates.\r\n\r\n### Additional context\r\n\r\nI am proposing a PR in the coming weeks to integrate these updates.\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2856],{"name":2857,"color":2858},"stale","ededed",3021,"vuejs","vitepress","open","Make the default theme compatible with 3rd-party CSS frameworks","2023-11-06T14:43:58Z","https://github.com/vuejs/vitepress/issues/3021",0.6954418,{"description":2868,"labels":2869,"number":2874,"owner":2860,"repository":2861,"state":2862,"title":2875,"updated_at":2876,"url":2877,"score":2878},"### Describe the bug\n\nhttps://github.com/vuejs/vitepress/pull/3359 makes it so that there are two separate headers now (`VPNav` and `VPLocalNav`), which make it impossible to apply single style for header, such as blur effect. Even if I remove the divider and border, it'll look as follow:\r\n\r\n\n\n### Reproduction\n\nAdd blur filter to `VPNav` and `VPLocalNav` and remove borders.\n\n### Expected behavior\n\nBoth headers should be wrapped under single element (eg, `\u003Cheader>`).\n\n### System Info\n\n```Text\n-\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2870,2873],{"name":2871,"color":2872},"theme","0754FB",{"name":2857,"color":2858},3393,"New local navbar design breaks ubiquitous header styling","2024-03-07T11:19:13Z","https://github.com/vuejs/vitepress/issues/3393",0.7070289,{"description":2880,"labels":2881,"number":2885,"owner":2860,"repository":2861,"state":2886,"title":2887,"updated_at":2888,"url":2889,"score":2890},"### Describe the bug\r\n\r\nMy vue component contains table element(ant-design-vue table), when I use it in doc file, table style is overwrited by vp-doc class and looks strange(and with some other built-in style like vp-doc th).Can this be removed?Otherwise I should manually overwrite again.\r\n\r\n\r\n\r\n### Reproduction\r\n\r\n[stackblitz](https://stackblitz.com/edit/vite-bjmwuo?file=docs%2F.vitepress%2Ftheme%2Findex.ts)\r\n\r\n### Expected behavior\r\n\r\nconfig to remove vp-doc table style\r\n\r\n### System Info\r\n\r\n```Text\r\n\"vitepress\": \"^1.0.0-rc.39\"\r\nSystem macOS 14.2.1 (23C71)\r\nBrowser Chrome 120.x\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2882],{"name":2883,"color":2884},"need more info","bdbefc",3523,"closed","How to remove .vp-doc table style","2024-02-09T00:04:26Z","https://github.com/vuejs/vitepress/issues/3523",0.6520731,{"description":2892,"labels":2893,"number":2894,"owner":2860,"repository":2861,"state":2886,"title":2895,"updated_at":2896,"url":2897,"score":2898},"### Describe the bug\n\n\r\n\r\nMy component style is the red box on the left, and the blue box on the right is the default of vitepress, which causes the style of my component to be overwritten. How can I configure the table style without using vitepress and use the style of my component?\r\n\r\n我的组件样式是左侧红框的,右侧蓝框是 vitepress 默认的,导致覆盖了我组件的样式,我怎么才能配置不使用 vitepress 的 table 样式,用我组件的样式\n\n### Reproduction\n\nNone\n\n### Expected behavior\n\nNone\n\n### System Info\n\n```Text\nNone\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],4309,"How to disable all styles for a .vp-doc table","2024-11-04T04:43:46Z","https://github.com/vuejs/vitepress/issues/4309",0.656293,{"description":2900,"labels":2901,"number":2902,"owner":2860,"repository":2861,"state":2886,"title":2903,"updated_at":2904,"url":2905,"score":2906},"### Is your feature request related to a problem? Please describe.\r\n\r\nI use Vitepress to document my component library. Sometimes, the style of the components is \"overridden\" by the Vitepress CSS, or just applied.\r\n\r\nFor example, with a component using a `\u003Ctable />` HTMLElement (https://maz-ui.com/components/maz-table), the VitePress CSS is applied to my component and changes its style. **I don't want it.** \r\n\r\n[See CSS file here](https://github.com/vuejs/vitepress/blob/df8753bd927c2b57b9188fb292c1429e9c3c8ab6/src/client/theme-default/styles/components/vp-doc.css#L176)\r\n\r\n```css\r\n.vp-doc table {\r\n display: block;\r\n border-collapse: collapse;\r\n margin: 20px 0;\r\n overflow-x: auto;\r\n}\r\n\r\n.vp-doc tr {\r\n background-color: var(--vp-c-bg);\r\n border-top: 1px solid var(--vp-c-divider);\r\n transition: background-color 0.5s;\r\n}\r\n\r\n.vp-doc tr:nth-child(2n) {\r\n background-color: var(--vp-c-bg-soft);\r\n}\r\n\r\n.vp-doc th,\r\n.vp-doc td {\r\n border: 1px solid var(--vp-c-divider);\r\n padding: 8px 16px;\r\n}\r\n\r\n.vp-doc th {\r\n text-align: left;\r\n font-size: 14px;\r\n font-weight: 600;\r\n color: var(--vp-c-text-2);\r\n background-color: var(--vp-c-bg-soft);\r\n}\r\n\r\n.vp-doc td {\r\n font-size: 14px;\r\n}\r\n```\r\n\r\n### Describe the solution you'd like\r\n\r\nI don't want the style to be applied to selected elements.\r\n\r\n### Describe alternatives you've considered\r\n\r\nAs the [tailwindcss-typography](https://github.com/tailwindlabs/tailwindcss-typography) library suggests [here](https://github.com/tailwindlabs/tailwindcss-typography?tab=readme-ov-file#advanced-topics) with the class `not-prose`. \r\n\r\nI propose to add a class like `no-vp-style` or something else to not apply CSS to the HTML element where the class is set and other DOM inside.\r\n\r\n```md\r\n## Documentation\r\n\r\n\u003CMazTable class=\"no-vp-style\" />\r\n```\r\n\r\nWith a CSS rule like : \r\n\r\n```css\r\n.vp-doc table:not(:where([class~='no-vp-style'], [class~='no-vp-style'] *)) {\r\n ...\r\n}\r\n```\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],3652,"Add CSS class to disable vitepress CSS to avoid conflicts and override","2024-03-21T00:04:41Z","https://github.com/vuejs/vitepress/issues/3652",0.6570065,{"description":2908,"labels":2909,"number":2913,"owner":2860,"repository":2861,"state":2886,"title":2914,"updated_at":2915,"url":2916,"score":2917},"### Is your feature request related to a problem? Please describe.\n\nI am rendering components in `.vp-doc` and my component's h2 gets style of VitePress which I don't want.\n\n### Describe the solution you'd like\n\nAdd class `not-vp-doc` to omit applying styles\n\n### Describe alternatives you've considered\n\nnone\n\n### Additional context\n\nI checked the source and found that all styles are written in CSS and it isn't quick to apply the `:not()` selector because there's list of `vp-doc` class usage and I might break something in hurry.\r\n\r\nI am in hurry hence creating this issue instead of PR.\r\n\r\nWill the team going to use SCSS in favor or refactor?\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2910],{"name":2911,"color":2912},"duplicate","cfd3d7",808,"Allow excluding styles for tags like h2 in `vp-doc`","2023-01-21T14:34:01Z","https://github.com/vuejs/vitepress/issues/808",0.67259043,{"description":2919,"labels":2920,"number":236,"owner":2860,"repository":2861,"state":2886,"title":2921,"updated_at":2922,"url":2923,"score":2924},"### Is your feature request related to a problem? Please describe.\n\nNoticing that there is a distinct difference from vue press custom containers to that of vite's\r\n\r\n## vue press\r\n\u003Cimg width=\"784\" alt=\"Screenshot 2022-08-11 at 3 38 20 PM\" src=\"https://user-images.githubusercontent.com/1858427/184088154-0c171530-b416-4fab-96a9-4f587e8220dc.png\">\r\n\r\n\r\n## vite press\r\n\u003Cimg width=\"734\" alt=\"Screenshot 2022-08-11 at 3 38 30 PM\" src=\"https://user-images.githubusercontent.com/1858427/184088178-03b9564b-e9b9-4ba6-a197-f64c3249a923.png\">\r\n\r\n\n\n### Describe the solution you'd like\n\nI know that the color can be overridden in https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css\r\n\r\nbut, the for the style difference for this line \r\n\u003Cimg width=\"76\" alt=\"Screenshot 2022-08-11 at 3 53 52 PM\" src=\"https://user-images.githubusercontent.com/1858427/184088784-33fdfeaf-115e-47bc-b43d-be355ef67f7d.png\">\r\n\r\nis it possible to expose an option to be configured, like\r\n```\r\nthemeConfig : {\r\n logo: xxx,\r\n customContainer: {\r\n withLeftBorder: true,\r\n cornerRadius: \"6px\"\r\n }\r\n}\r\n```\r\n\r\nEffect:\r\n\u003Cimg width=\"223\" alt=\"Screenshot 2022-08-11 at 4 03 14 PM\" src=\"https://user-images.githubusercontent.com/1858427/184090149-ca7ddd87-d574-4a4a-8704-d594588f7f3c.png\">\r\n\r\n\n\n### Describe alternatives you've considered\n\nAlternatively,\r\nthese two properties can be exposed in css variables: https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css\r\n\r\nsomething like: \r\n```\r\n//add corner radius\r\n--vp-custom-block-border-radius: 6px;\r\n//remove border, add lable left border\r\n--vp-custom-block-info-border: none;\r\n--vp-custom-block-info-left-border: var(--vp-c-green-darker);\r\n--vp-custom-block-info-left-border-width: 5px \r\n\r\n```\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],"custom containers style option","2023-01-21T14:28:46Z","https://github.com/vuejs/vitepress/issues/1157",0.6769061,{"description":2926,"labels":2927,"number":2928,"owner":2860,"repository":2861,"state":2886,"title":2929,"updated_at":2930,"url":2931,"score":2932},"**Is your feature request related to a problem? Please describe.**\r\nCurrently, importing Vue components (whether they are VitePress components, or components from a library for example) are influenced by VitePress's somewhat sub-optimal styles.\r\n\r\nFor example, all headings are styled, so as soon as a component uses an `h1`/`h2`/etc, it will inherit those styles, making VitePress virtually unusable for component libraries that ship their own CSS.\r\n\r\nThe only I can think of mitigating this, is to use a web component as a base for Vue components to be mounted in, as styles are local to web components if I remember correctly.\r\n\r\n**Describe the solution you'd like**\r\nSome way to render components with their own styles, and not inherit styles from the docs.\r\n\r\n**Describe alternatives you've considered**\r\nI tries unsetting all styles `* { all: unset; }` inside our demo component (the wrapper for all other components), but that also removes some of the Tailwind related styling unfortunately.\r\n\r\nI couldn't get web components to work, as the vue plugin seems to be for Vue 2 (https://github.com/vuejs/vue-web-component-wrapper).",[],248,"[Feature] - Allow local styling of components","2023-01-21T16:04:20Z","https://github.com/vuejs/vitepress/issues/248",0.6794618,{"description":2934,"labels":2935,"number":2936,"owner":2860,"repository":2861,"state":2886,"title":2937,"updated_at":2938,"url":2939,"score":2940},"### Is your feature request related to a problem? Please describe.\n\nWhen 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.\n\n### Describe the solution you'd like\n\nIt 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](https://github.com/tailwindlabs/tailwindcss-typography).\n\n### Describe alternatives you've considered\n\nI 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.\n\nI 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.\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [x] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [x] Read the [docs](https://vitepress.dev).\n- [x] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [x] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],4731,"Default theme: Add class to opt out of .vp-doc styles","2025-05-04T08:39:09Z","https://github.com/vuejs/vitepress/issues/4731",0.68021876,{"description":2942,"labels":2943,"number":2954,"owner":2860,"repository":2861,"state":2886,"title":2955,"updated_at":2956,"url":2957,"score":2958},"### Describe the bug\n\nJust like the Vite docs, I use custom styles in the `index.md` file using `\u003Cstyle module>`. I also use custom components in which I use `\u003Cstyle scoped>`.\r\n\r\nSince I updated from version `1.0.0` to the latest one (the one in the StackBlitz), the built page's styles are broken. In the dev preview everything looks like expected.\n\n### Reproduction\n\nOpen the StackBlitz Demo with this [link](https://stackblitz.com/edit/vite-1qtmk8?file=docs%2Findex.md).\r\n\r\nIf it does not run automatically, run `npm install && npm run dev`. It should look something like this:\r\n\r\n\r\n\r\nThen run `npm run docs:build && npm run docs:preview` and it will look like this:\r\n\r\n\r\n\r\nAs you can see, the hero image and its background are different and the cards are different as well.\n\n### Expected behavior\n\nI expected the built version to look just like the dev preview (or at least very close).\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (12) x64 AMD Ryzen 5 5500U with Radeon Graphics\r\n Memory: 6.45 GB / 15.35 GB\r\n Binaries:\r\n Node: 21.2.0 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 10.5.0 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 9.1.2 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\r\n Browsers:\r\n Edge: Chromium (127.0.2651.74)\r\n Internet Explorer: 11.0.19041.4355\r\n npmPackages:\r\n vitepress: ^1.3.1 => 1.3.1\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [x] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2944,2947,2950,2953],{"name":2945,"color":2946},"help wanted","008672",{"name":2948,"color":2949},"build","377ba8",{"name":2951,"color":2952},"upstream","BF29ED",{"name":2857,"color":2858},4098,"Styling discrepancies between dev and build","2025-01-05T04:42:47Z","https://github.com/vuejs/vitepress/issues/4098",0.6860208,["Reactive",2960],{},["Set"],["ShallowReactive",2963],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fyZuXZbs9qAXQrVRM70rXb00QuiViwElUq5fge-tz7ck":-1},"/vuejs/vitepress/1777"]