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

可否利用 cssClass 来给特定md文件应用 css 样式? #4

Open
zhaohongxuan opened this issue Mar 15, 2024 · 4 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@zhaohongxuan
Copy link

Obsidian 支持 cssClass,只要在 markdown 文件的 frontmatter 上加上 cssClasses信息,就不会将 css snippet 应用到整个 vault 的文件上了。也就不需要额外创建一个 vault 管理简历了。
可以参考这里: https://forum.obsidian.md/t/css-for-specific-pages/13913

@YiNNx YiNNx added the enhancement New feature or request label Mar 15, 2024
@YiNNx
Copy link
Member

YiNNx commented Mar 15, 2024

感谢建议!确实是更好的处理方式

@zhaohongxuan
Copy link
Author

我尝试了一下在最外层套了个 .resume class,发现有一部分元素不起作用,对 css 不是很熟悉,没找到问题在哪里。

image image

@YiNNx YiNNx added the help wanted Extra attention is needed label Mar 17, 2024
@thewangcj
Copy link

我尝试了一下在最外层套了个 .resume class,发现有一部分元素不起作用,对 css 不是很熟悉,没找到问题在哪里。

image image

body 之外套一层类选择器是无效的,把 .resume 放到除了 body 之外的地方,也就是在 @media print { 这一行到最后的外面套上一层

@zhaohongxuan
Copy link
Author

我尝试了一下在最外层套了个 .resume class,发现有一部分元素不起作用,对 css 不是很熟悉,没找到问题在哪里。
image image

body 之外套一层类选择器是无效的,把 .resume 放到除了 body 之外的地方,也就是在 @media print { 这一行到最后的外面套上一层

试了一下,确实可以了👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants