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

Bold, italic, underline, and strikethrough inherit the block element color #13043

Closed
3 tasks done
Mctalos opened this issue Nov 5, 2024 · 3 comments
Closed
3 tasks done
Assignees
Milestone

Comments

@Mctalos
Copy link

Mctalos commented Nov 5, 2024

粗体、斜体、下划线和删除线继承块元素颜色

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

如果块设定了颜色样式appearance,对其中一些文字选择加粗,字体颜色变为黑色。
之前的版本不是这样的,会保留字体颜色的。

default.mp4

Expected result

以前,对块设定样式appearance,里面输入的文字都会继承块的设定,对其中的某些文本字段进行加粗,是可以保留块所设定的颜色的。
现在不行了,加粗的文本字体颜色变回黑色。需要手动再设置颜色。比之前操作量增加了。

Screenshot or screen recording presentation

No response

Version environment

- Version: v3.1.10
- Operating System: win10最新

Log file

siyuan.log

More information

No response

@Vanessa219
Copy link
Member

应该一直都是这样的,22 年的代码就是这样的了,被以下样式重置了。

QQ_1730810229396

@TCOTC
Copy link
Contributor

TCOTC commented Nov 5, 2024

一直都有用户反馈这个加粗之后字体变黑的问题来着。我建议统一去掉行级元素自带的 color

image

@Mctalos
Copy link
Author

Mctalos commented Nov 5, 2024

应该一直都是这样的,22 年的代码就是这样的了,被以下样式重置了。

QQ_1730810229396

额,我把我的笔记又翻了看了下,确实是我记错了,我之前的用法是:设置了块的样式appearance,然后设置标题等级heading,是heading自带了加粗的效果,这个情况下,可以同时继承块appearance & heading的设置。

但是,我在想,块和文本 appearance设置、显示的优先级,可否优化下,我认为以下这种逻辑可能更好一点?

  1. 文本同时继承 块appearance设置和 文本的设置(仅限加粗、下划线、斜体)。
  2. 如果 对文本设置了appearance,和文本所属块的appearance设置冲突,则优先文本设置的appearance。

这样的话,和目前appearance 中 delete style 的操作逻辑保持一致,好一点,编辑的自由度、统一性也能更好一点。

@Vanessa219 Vanessa219 changed the title 如果块设定颜色样式,对文本加粗后,字体颜色会自动变成黑色 粗体、斜体、下划线和删除线继承块元素颜色 Nov 6, 2024
@Vanessa219 Vanessa219 added this to the 3.1.12 milestone Nov 6, 2024
Vanessa219 added a commit that referenced this issue Nov 6, 2024
@88250 88250 changed the title 粗体、斜体、下划线和删除线继承块元素颜色 Bold, italic, underline, and strikethrough inherit the block element color Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants