Browse Source

BI-44549 feat: 字体资源添加函数

es6
windy 6 years ago
parent
commit
5b119040f9
  1. 11
      changelog.md
  2. 2
      dist/2.0/fineui.css
  3. 2
      dist/bundle.css
  4. 2
      dist/fineui.css
  5. 2
      dist/resource.css
  6. 2
      public/css/font.css
  7. 2
      src/css/resource/font.css
  8. 28
      src/less/image.less
  9. 15
      src/less/resource/font.less
  10. 2
      ui/css/font.css

11
changelog.md

@ -1,4 +1,15 @@
# 更新日志
2.0(2019-05)
- 增加less函数: 字体资源添加函数addFontRe和字体激活函数activeFont
> @fontList: "dec", "report";
> .addFontRes("dec");
> .addFontRes("report");
> .activeFont(@fontList);
以上即可使用自定义的dec,report字体和fineui的资源字体
2.0(2019-04)
- 新增`bi.multi_tree_list_combo`控件, 此下拉树勾选节点时不会影响父子节点的勾选状态
- 新增`bi.multi_tree_insert_combo`控件, 此下拉树可以插入不存在的新值

2
dist/2.0/fineui.css vendored

@ -4901,7 +4901,7 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none;
}
@font-face {
font-family: 'bi';
font-family: "bi";
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot');
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */

2
dist/bundle.css vendored

@ -4901,7 +4901,7 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none;
}
@font-face {
font-family: 'bi';
font-family: "bi";
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot');
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */

2
dist/fineui.css vendored

@ -4901,7 +4901,7 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none;
}
@font-face {
font-family: 'bi';
font-family: "bi";
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot');
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('resources?path=/com/fr/web/ui/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('resources?path=/com/fr/web/ui/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */

2
dist/resource.css vendored

@ -414,7 +414,7 @@ textarea::-webkit-scrollbar-thumb:hover {
_background: none;
}
@font-face {
font-family: 'bi';
font-family: "bi";
src: url('font/iconfont.eot');
src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */

2
public/css/font.css

@ -1,5 +1,5 @@
@font-face {
font-family: 'bi';
font-family: "bi";
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot');
src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */

2
src/css/resource/font.css

@ -1,5 +1,5 @@
@font-face {
font-family: 'bi';
font-family: "bi";
src: url('font/iconfont.eot');
src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */

28
src/less/image.less

@ -332,6 +332,34 @@
}
}
// 添加字体资源
.addFontRes(@name, @fontUrl) {
@font-face {
font-family: "@{name}";
src: url('@{fontUrl}iconfont.eot');
src: url('@{fontUrl}iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('@{fontUrl}iconfont.woff') format('woff'), /* chrome、firefox */ url('@{fontUrl}iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('@{fontUrl}iconfont.svg#svgFontName') format('svg'); /* iOS 4.1- */
}
}
// 激活字体
.activateFont(@fonts) {
@baseProperty: {
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
};
.b-font when not ((length(@fonts) = 1) and (extract(@fonts, 1) = "bi")) {
font-family: @fonts, "bi";
@baseProperty();
}
.b-font when ((length(@fonts) = 1) and (extract(@fonts, 1) = "bi")) {
font-family: @fonts;
@baseProperty();
}
}
// 默认font
.font(@class,@content, @color: @color-bi-font-native) {
@fc: "\@{content}";

15
src/less/resource/font.less

@ -2,19 +2,8 @@
@import "../lib/colors";
@import "../image";
@font-face {
font-family: 'bi';
src: url('@{fontUrl}iconfont.eot');
src: url('@{fontUrl}iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('@{fontUrl}iconfont.woff') format('woff'), /* chrome、firefox */ url('@{fontUrl}iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('@{fontUrl}iconfont.svg#svgFontName') format('svg'); /* iOS 4.1- */
}
.b-font {
font-family: "bi";
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.addFontRes("bi", @fontUrl);
.activateFont("bi");
.font(close-font, @font-cross);
.font-hover(close-h-font, @font-cross);

2
ui/css/font.css

@ -1,5 +1,5 @@
@font-face {
font-family: 'bi';
font-family: "bi";
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot');
src: url('resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('resources?path=/com/fr/web/ui/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('resources?path=/com/fr/web/ui/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */

Loading…
Cancel
Save