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

[Bug]: CSS style interference #1523

Open
ChenXplorer opened this issue Oct 24, 2024 · 3 comments
Open

[Bug]: CSS style interference #1523

ChenXplorer opened this issue Oct 24, 2024 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@ChenXplorer
Copy link

Version

/

Details

“The following styles interfered with the display styles of my component library components.”

/*

  1. Make replaced elements display: block by default. (Fix the tiny gap under replaced elements that shows by default jensimmons/cssremedy#14)
  2. Add vertical-align: middle to align replaced elements more sensibly by default. (Fix the tiny gap under replaced elements that shows by default jensimmons/cssremedy#14 (comment))
    This can trigger a poorly considered lint error in some tools but is included by design.
    */

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block; /* 1 /
vertical-align: middle; /
2 */
}

Reproduce link

/

Reproduce Steps

/

@ChenXplorer ChenXplorer added the 🐞 bug Something isn't working label Oct 24, 2024
@ChenXplorer
Copy link
Author

ChenXplorer commented Oct 24, 2024

Image

when delete the css
Image

Image

@Timeless0911
Copy link
Contributor

This is from built-in tailwind preflight, you can add a global style in builderConfig.source.preEntry, thus your CSS code will be loaded earlier than the page code.

@ChenXplorer
Copy link
Author

不是,这个问题为什么需要我来加全局css样式覆盖?现在是这个样式 覆盖了我本身 组件库组件的样式,只是在文档站点 有问题,我其他地方使用组件的时候没有问题。仅仅是rspress出现了,像dumi 都没有这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants