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

Use of !important in style sheet breaks css for other things #19

Open
nimide opened this issue Feb 3, 2023 · 0 comments
Open

Use of !important in style sheet breaks css for other things #19

nimide opened this issue Feb 3, 2023 · 0 comments

Comments

@nimide
Copy link

nimide commented Feb 3, 2023

In your second styling element, you used an !important for the margin of the copy button. This makes the copy button perform this function across the entire vault and other plugins, including within things like notes, notices, etc. that use the "code-block" functionality. Also, the .copy-code-button is very broad. Could you make it more specific to the classes you are using in your plugin?

Code previously
.copy-code-button{
margin-top: 42px !important; /* 为自带的按钮增加上边距 */
}

Changes I made to make the plugin compatible with the rest of my plugins.
pre[class*="code-block-pre"] .copy-code-button{
margin-top: 42px; /* 为自带的按钮增加上边距 */
}

One thing I did not take the time to do is do this for every class type. I only did it for the situation where all three settings have been turned on for the plugin.

Thanks for all the hard work. I really enjoy using your plugin 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant