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

Using SFC in markdown, styles in the <style> tag is not effect. #3216

Closed
4 tasks done
ghost opened this issue Nov 17, 2023 · 0 comments
Closed
4 tasks done

Using SFC in markdown, styles in the <style> tag is not effect. #3216

ghost opened this issue Nov 17, 2023 · 0 comments
Labels
bug Something isn't working build Related to the build system

Comments

@ghost
Copy link

ghost commented Nov 17, 2023

Describe the bug

when I bump vitepress to 1.0.0-rc.26, I found the styles in <style> were not included in the packaged product.

The style here is normal in the development environment, but it doesn't work after packing.

<template>
  <div class="box">Preview after packing, The text color is expected to be red</div>
</template>

<style>
.box {
  color: red;
}
</style>

I try downgraded to 1.0.0-rc.25, it was normal.

Reproduction

reproduction link:
https://stackblitz.com/edit/vite-xmetfv?file=docs%2FDemo.vue

Expected behavior

Packaged for preview and styles can also take effect

related documents:
https://vitepress.dev/guide/using-vue#script-and-style

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
    Memory: 6.16 GB / 7.44 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    Yarn: 1.22.19 - /mnt/c/Program Files/nodejs/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
    pnpm: 8.10.5 - ~/.nvm/versions/node/v18.18.2/bin/pnpm
    bun: 1.0.12 - ~/.nvm/versions/node/v18.18.2/bin/bun
  npmPackages:
    vitepress: 1.0.0-rc.26 => 1.0.0-rc.26

Additional context

No response

Validations

@ghost ghost added the bug: pending triage Maybe a bug, waiting for confirmation label Nov 17, 2023
@ghost ghost changed the title Using SFC in markdown, the styles in Style won't take effect after packaging. Using SFC in markdown, styles in the <style> tag is not effect. Nov 17, 2023
@brc-dd brc-dd added bug Something isn't working build Related to the build system upstream Related to the dependencies and removed bug: pending triage Maybe a bug, waiting for confirmation labels Nov 17, 2023
@brc-dd brc-dd closed this as completed in da73b58 Nov 17, 2023
@brc-dd brc-dd removed the upstream Related to the dependencies label Nov 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working build Related to the build system
Projects
None yet
Development

No branches or pull requests

1 participant