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

【建议】能否取消例句的浅蓝色背景,在Anki的夜晚模式下不适配。 #311

Open
tinnlo opened this issue Jun 26, 2023 · 4 comments

Comments

@tinnlo
Copy link

tinnlo commented Jun 26, 2023

如题,因为这一块导入卡片的是HTML代码,无法在Anki中用夜晚模式的css来进行调整。

我试了一下无论用什么颜色,都很难适配白天跟夜晚两种模式。所以还是推荐取消,或者可以考虑加一个细框的方式。

麻烦作者考虑, 谢谢!

@ninja33
Copy link
Owner

ninja33 commented Jun 26, 2023

是这样的,每个词典都带了一个缺省的制卡用的css,那你说的例句的背景其实是在词典代码里
比如,柯林斯英汉双解词典

ul.sents {font-size:0.8em; list-style:square inside; margin:3px 0;padding:5px;background:rgba(13,71,161,0.1); border-radius:5px;}

你要是觉得需要用自己的样式。可以在模版的样式区域自己写个同样名字的class的css,然后加个!important来加强权重。
比如,你写一个这样的样式

ul.sents {
  background:rgba(13,71,161,0)!important
  border: solid, 1px!important
}

就可以看到如下效果
image

@tinnlo
Copy link
Author

tinnlo commented Jun 27, 2023

感谢回复! 但我不是开发者啊,看了一下,好像是要修改插件的样式代码,再自己安装,对吗?

我只是能够在Anki里勉强调整一下样式,下载插件源码调整对我来说难度有点高。。。

实在不行我就关掉夜晚模式吧,这样显示还是很好看的。 谢谢您!

@ninja33
Copy link
Owner

ninja33 commented Jun 27, 2023

不是改插件代码。加上面我给的这个样式,到anki模版的样式表里。你可以去看看anki的用户手册。

@tinnlo
Copy link
Author

tinnlo commented Jun 27, 2023

OK, 搞定了,谢谢老黄!

这是我在卡片styling里边添加的代码,供各位参考:

ul.sents {
  background:rgba(13,71,161,0) !important;
  border: 1px solid #e5e5e5 !important;
}

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

2 participants