vscode-markdown-preview-enhanced icon indicating copy to clipboard operation
vscode-markdown-preview-enhanced copied to clipboard

请问如何调整代码块的字体大小?

Open wuhua0871 opened this issue 6 years ago • 27 comments

如题,谢谢!

wuhua0871 avatar Apr 17 '19 15:04 wuhua0871

运行 Customize Css 命令打开 style.less 编辑如下:

.markdown-preview.markdown-preview {
  // modify your style here
  // eg: background-color: blue;

  pre[class*="language-"] span {
    font-size: 24px;
  }
}

会更改代码块字体为 24px。你修改成相应的大小就行了。 谢谢

shd101wyy avatar Apr 18 '19 02:04 shd101wyy

照着改了,但是没用呢。

wuhua0871 avatar Apr 18 '19 02:04 wuhua0871

可否来张截图,左边是 style.less,右边是预览?

shd101wyy avatar Apr 18 '19 03:04 shd101wyy

[cid:storage_001B-9622_%E6%88%AA%E5%9B%BE_PNG_1555559184405]

发送自我的三星盖乐世智能手机。

-------- 原始信息 -------- 发件人: Yiyi Wang [email protected] 日期: 2019/4/18 11:31 (GMT+08:00) 收件人: shd101wyy/markdown-preview-enhanced [email protected] 抄送: wuhua0871 [email protected], Author [email protected] 主题: Re: [shd101wyy/markdown-preview-enhanced] 请问如何调整代码块的字体大小? (#1110)

可否来张截图,左边是 style.less,右边是预览?

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1372, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMFXVZZ6AGJ2HJ5AHSSVCDPQ7TSZANCNFSM4HGVKGYQ.

wuhua0871 avatar Apr 18 '19 03:04 wuhua0871

你手机发送我看不见。等你有时间上电脑法给我吧。顺便试试 font-size: 24px !important 看看有没有用。

shd101wyy avatar Apr 18 '19 03:04 shd101wyy

截图2 截图

wuhua0871 avatar Apr 18 '19 13:04 wuhua0871

Weird... 你试试添加 background-color: red; 看看 preview 的颜色有没有变成红色?

shd101wyy avatar Apr 19 '19 05:04 shd101wyy

没有,还是跟之前一样

发送自我的三星盖乐世智能手机。

-------- 原始信息 -------- 发件人: Yiyi Wang [email protected] 日期: 2019/4/19 13:27 (GMT+08:00) 收件人: shd101wyy/markdown-preview-enhanced [email protected] 抄送: wuhua0871 [email protected], Author [email protected] 主题: Re: [shd101wyy/markdown-preview-enhanced] 请问如何调整代码块的字体大小? (#1110)

Weird... 你试试添加 background-color: red; 看看 preview 的颜色有没有变成红色?

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1372, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMFXVYCVAMOH3VIMKIUB2LPRFJ3FANCNFSM4HGVKGYQ.

wuhua0871 avatar Apr 19 '19 05:04 wuhua0871

你右键点击下编辑器右侧的预览然后看看它有没有弹出一个菜单栏?

shd101wyy avatar Apr 19 '19 05:04 shd101wyy

有的,以下四类:

  • 在浏览器中打开
  • 格式转换
  • 图片助手
  • 同步源

发送自我的三星盖乐世智能手机。

-------- 原始信息 -------- 发件人: Yiyi Wang [email protected] 日期: 2019/4/19 13:38 (GMT+08:00) 收件人: shd101wyy/markdown-preview-enhanced [email protected] 抄送: wuhua0871 [email protected], Author [email protected] 主题: Re: [shd101wyy/markdown-preview-enhanced] 请问如何调整代码块的字体大小? (#1110)

你右键点击下编辑器右侧的预览然后看看它有没有弹出一个菜单栏?

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1372, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMFXVZGAT7NMAVB32MI4V3PRFLFRANCNFSM4HGVKGYQ.

wuhua0871 avatar Apr 19 '19 05:04 wuhua0871

可否来张截图?

shd101wyy avatar Apr 19 '19 05:04 shd101wyy

发送自我的三星盖乐世智能手机。

wuhua0871 avatar Apr 19 '19 05:04 wuhua0871

捕获3

wuhua0871 avatar Apr 19 '19 06:04 wuhua0871

你把 font-size 调整大于 24px 也没用?

shd101wyy avatar Apr 21 '19 12:04 shd101wyy

试了,改大改小都没用

发送自我的三星盖乐世智能手机。

-------- 原始信息 -------- 发件人: Yiyi Wang [email protected] 日期: 2019/4/21 20:41 (GMT+08:00) 收件人: shd101wyy/markdown-preview-enhanced [email protected] 抄送: wuhua0871 [email protected], Author [email protected] 主题: Re: [shd101wyy/markdown-preview-enhanced] 请问如何调整代码块的字体大小? (#1110)

你把 font-size 调整大于 24px 也没用?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1372, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMFXV57Q6LAQVPAR5CBTVTPRROJDANCNFSM4HGVKGYQ.

wuhua0871 avatar Apr 22 '19 08:04 wuhua0871

痛心。还有一种方法就是你右键点击预览选择 Open in Browser 打开到你的浏览器之后,手动调整代码块的 css,然后 work 了的话在把你修改过的 css 拷贝到你的 style.less 中。

我有点好奇哈,如果你还用别的 previewTheme 也有这个问题吗?

谢谢

shd101wyy avatar Apr 22 '19 08:04 shd101wyy

换了一遍所有主题,都一样的没效果。

有个发现,当显示文档前的说明为代码块时,配置对其是起作用的,正文代码块不起作用。

浏览器改样式我还不会操作呢,等回头研学习下。

发送自我的三星盖乐世智能手机。

-------- 原始信息 -------- 发件人: Yiyi Wang [email protected] 日期: 2019/4/22 16:43 (GMT+08:00) 收件人: shd101wyy/markdown-preview-enhanced [email protected] 抄送: wuhua0871 [email protected], Author [email protected] 主题: Re: [shd101wyy/markdown-preview-enhanced] 请问如何调整代码块的字体大小? (#1110)

痛心。还有一种方法就是你右键点击预览选择 Open in Browser 打开到你的浏览器之后,手动调整代码块的 css,然后 work 了的话在把你修改过的 css 拷贝到你的 style.less 中。

我有点好奇哈,如果你还用别的 previewTheme 也有这个问题吗?

谢谢

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1372, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMFXV64VC2RLVGEVK52AH3PRV3C7ANCNFSM4HGVKGYQ.

wuhua0871 avatar Apr 22 '19 09:04 wuhua0871

稍微折腾了一下,无法修改字体大小的原因在于

image

code 的字体大小使用 !important 限制住了,所以自定义的也用 !important 即可

  pre[class*="language-"] span {
    font-size: 24px !important;
  }

wafer-li avatar May 25 '19 15:05 wafer-li

能否请教一下,修改的是哪个文件,哪个地方呢?

谢谢!

发送自我的三星盖乐世智能手机。

-------- 原始信息 -------- 发件人: Wafer Li [email protected] 日期: 2019/5/25 23:03 (GMT+08:00) 收件人: shd101wyy/markdown-preview-enhanced [email protected] 抄送: wuhua0871 [email protected], Author [email protected] 主题: Re: [shd101wyy/markdown-preview-enhanced] 请问如何调整代码块的字体大小? (#1110)

稍微折腾了一下,无法修改字体大小的原因在于

[image]https://user-images.githubusercontent.com/12459199/58371108-15fcc680-7f41-11e9-90da-8c1c98ea6151.png

code 的字体大小使用 !important 限制住了,所以自定义的也用 !important 即可

pre[class*="language-"] span {

font-size: 24px !important;

}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1372?email_source=notifications&email_token=AGMFXVYFYFUA7TTJKILR5PTPXFILBA5CNFSM4HGVKGY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWHTODI#issuecomment-495925005, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMFXV4R5OEG23M6JFXE6J3PXFILBANCNFSM4HGVKGYQ.

wuhua0871 avatar Jun 25 '19 02:06 wuhua0871

@wuhua0871 cmd-shift-p 运行 Markdown Preview Enhanced: Customize Css 命令打开 style.less 在里面编辑即可。

shd101wyy avatar Jun 25 '19 02:06 shd101wyy

这个已经改了呢的。普通字体大小变了,代码还是默认大小呢

发送自我的三星盖乐世智能手机。

-------- 原始信息 -------- 发件人: Yiyi Wang [email protected] 日期: 2019/6/25 10:22 (GMT+08:00) 收件人: shd101wyy/markdown-preview-enhanced [email protected] 抄送: wuhua0871 [email protected], Mention [email protected] 主题: Re: [shd101wyy/markdown-preview-enhanced] 请问如何调整代码块的字体大小? (#1110)

@wuhua0871https://github.com/wuhua0871 cmd-shift-p 运行 Markdown Preview Enhanced: Customize Css 命令打开 style.less 在里面编辑即可。

― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1372?email_source=notifications&email_token=AGMFXV7F555G5JKG5MNHMMTP4F6O3A5CNFSM4HGVKGY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYOYQ2Q#issuecomment-505251946, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGMFXV5P36LSBGQABJ5XXR3P4F6O3ANCNFSM4HGVKGYQ.

wuhua0871 avatar Jun 25 '19 02:06 wuhua0871

image image 字体没有变化。。。

LeoMax-Xiong avatar Mar 06 '20 10:03 LeoMax-Xiong

我将vs code 更新之后字体变大了。

LeoMax-Xiong avatar Mar 12 '20 03:03 LeoMax-Xiong

pre[data-role="codeBlock"] {
  font-size: 20px !important;
}

从别的issue找来的

Ez2Mi avatar Jul 12 '21 12:07 Ez2Mi

如题,谢谢!

找到你在vscode中使用的主题 image

然后找打插件主题: 直接修改css文件 %userprofile%.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.8.7\crossnote\styles\preview_theme image

然后搜索code 找到font-size字段 image

youhuiji avatar Oct 18 '23 07:10 youhuiji

如题,谢谢!

找到你在vscode中使用的主题 image

然后找打插件主题: 直接修改css文件 %userprofile%.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.8.7\crossnote\styles\preview_theme image

然后搜索code 找到font-size字段 image

it works!

qyangcv avatar Nov 02 '23 13:11 qyangcv

如题,谢谢!

找到你在vscode中使用的主题 image 然后找打插件主题: 直接修改css文件 %userprofile%.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.8.7\crossnote\styles\preview_theme image 然后搜索code 找到font-size字段 image

it works!

It is best to disable the update of this plug-in, otherwise the original modified file will be overwritten after the update.

youhuiji avatar Nov 02 '23 14:11 youhuiji