ViewUI icon indicating copy to clipboard operation
ViewUI copied to clipboard

[Feature Request]希望增加字体配置

Open lxj665294 opened this issue 6 years ago • 4 comments

What problem does this feature solve?

升级4.0后页面字体大小等全部改变影响已开发页面,如要调整页面改动量大。希望能通过变量设置或者定制主题设置可以支持组件不同size下的字体大小。现有通过定制主题设置@font-base-size并不理想

What does the proposed API look like?

通过全局设置基础字体大小或者通过@font-base-size、@font-small-size、@font-large-size设置就能改变所有组件不同size下的大小

lxj665294 avatar Mar 16 '20 02:03 lxj665294

官方已经提供了此配置,见:

官方文档:https://www.iviewui.com/docs/guide/theme 原始文件:view-design/src/styles/index.less

部分配置节选:

...
@font-size-base         : 14px;
@font-size-small        : 12px;
@font-size-large        : 16px;
@line-height-base       : 1.5;
@line-height-computed   : floor((@font-size-base * @line-height-base));
@border-radius-base     : 6px;
@border-radius-small    : 4px;
...

tongwoo avatar Mar 17 '20 14:03 tongwoo

官方已经提供了此配置,见:

官方文档:https://www.iviewui.com/docs/guide/theme 原始文件:view-design/src/styles/index.less

部分配置节选:

...
@font-size-base         : 14px;
@chavyleung         : 12px;
@font-size-large        : 16px;
@line-height-base       : 1.5;
@line-height-computed   : floor((@font-size-base * @line-height-base));
@border-radius-base     : 6px;
@border-radius-small    : 4px;
...

其实我真正想的是保持3.x版本样式;其实3.x版本和4.x版本的字体基础配置是一样的,不过是4.x版本中直接把一些原本用

官方已经提供了此配置,见:

官方文档:https://www.iviewui.com/docs/guide/theme 原始文件:view-design/src/styles/index.less

部分配置节选:

...
@font-size-base         : 14px;
@font-size-small        : 12px;
@font-size-large        : 16px;
@line-height-base       : 1.5;
@line-height-computed   : floor((@font-size-base * @line-height-base));
@border-radius-base     : 6px;
@border-radius-small    : 4px;
...

其实我真正想的是保持3.x版本样式;其实3.x版本和4.x版本的字体基础配置是一样的,不过是4.x版本中直接把一些原本用@font-size-small 或者font-size为12px的地方用@font-size-base替换了;所以直接更改基础配置也会有问题

lxj665294 avatar Mar 18 '20 01:03 lxj665294

+1

jekorx avatar Apr 07 '20 08:04 jekorx

+1

misterpancn avatar Feb 03 '21 03:02 misterpancn