Browse Source

Pull request #2163: 无JIRA任务 优化一下

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '39f18b37f38e0df5d21b5d7b01a05f66f6c34390':
  整理样式
  整理样式
es6
guy 3 years ago
parent
commit
fcca99ad3a
  1. 2
      src/less/base/combo/combo.bubble.less
  2. 4
      src/less/base/combo/combo.less
  3. 2
      src/less/base/single/button/button.less
  4. 10
      src/less/base/single/tip/tip.bubble.less
  5. 10
      src/less/base/single/tip/tip.toast.less
  6. 8
      src/less/base/single/tip/tip.tooltip.less
  7. 2
      src/less/base/tree/tree.expander.less
  8. 56
      src/less/core/utils/common.less
  9. 1
      src/less/index.less
  10. 19
      src/less/lib/colors.less
  11. 15
      src/less/lib/constant.less
  12. 52
      src/less/lib/theme.less
  13. 2
      src/less/widget/dynamicdatecombo/dynamicdatetime.combo.less
  14. 2
      src/less/widget/multilayerselecttree/multilayerselecttree.combo.less
  15. 2
      src/less/widget/multilayersingletree/multilayersingletree.combo.less
  16. 2
      src/less/widget/multiselect/multiselect.insert.combo.less
  17. 2
      src/less/widget/multitree/multi.tree.combo.less
  18. 4
      src/less/widget/numbereditor/number.editor.less
  19. 2
      src/less/widget/searchmultiselect/searchmultiselect.less
  20. 2
      src/less/widget/singleselect/singleselect.combo.less
  21. 2
      src/less/widget/timecombo/timecombo.less

2
src/less/base/combo/combo.bubble.less

@ -7,7 +7,7 @@
line-height: 0; line-height: 0;
.z-index-layer(@zIndex-popup); .z-index-layer(@zIndex-popup);
// ie10一下无背景色会鼠标穿透 // ie10一下无背景色会鼠标穿透
.background-color(@background-color-default, 0); .background-color(@color-bi-background-default, 0);
} }
& .bubble-combo-triangle-left { & .bubble-combo-triangle-left {
z-index: 1; z-index: 1;

4
src/less/base/combo/combo.less

@ -29,7 +29,7 @@
&.disabled { &.disabled {
&.bi-combo-hover, &:hover { &.bi-combo-hover, &:hover {
&.bi-border { &.bi-border {
border-color: @border-color-line; border-color: @color-bi-border-line;
} }
} }
} }
@ -40,7 +40,7 @@
&.disabled { &.disabled {
&.bi-combo-hover, &:hover { &.bi-combo-hover, &:hover {
&.bi-border { &.bi-border {
border-color: @border-color-line-theme-dark; border-color: @color-bi-border-line-theme-dark;
} }
} }
} }

2
src/less/base/single/button/button.less

@ -174,7 +174,7 @@ body .bi-button, #body .bi-button {
&.button-common, &.button-success, &.button-warning, &.button-error { &.button-common, &.button-success, &.button-warning, &.button-error {
&:after { &:after {
content: ""; content: "";
background-color: @color-bi-button-mask; background-color: @color-bi-background-button-mask;
.border-radius(10px); .border-radius(10px);
display: block; display: block;
width: 100%; width: 100%;

10
src/less/base/single/tip/tip.bubble.less

@ -5,26 +5,26 @@
.border-radius(2px); .border-radius(2px);
&.bubble-error{ &.bubble-error{
background: @color-bi-background-light-failure; background: @color-bi-background-bubble-error;
color: @color-bi-text-failure; color: @color-bi-text-failure;
} }
.bi-theme-dark &.bubble-error { .bi-theme-dark &.bubble-error {
background: @color-bi-background-dark-failure; background: @color-bi-background-bubble-error-theme-dark;
} }
&.bubble-common{ &.bubble-common{
background: @color-bi-background-light-highlight; background: @color-bi-background-bubble-normal;
color: @color-bi-text-highlight; color: @color-bi-text-highlight;
} }
&.bubble-success{ &.bubble-success{
background: @color-bi-background-light-success; background: @color-bi-background-bubble-success;
color: @color-bi-text-success; color: @color-bi-text-success;
} }
&.bubble-warning{ &.bubble-warning{
background: @color-bi-background-light-warning; background: @color-bi-background-bubble-warning;
color: @color-bi-text-redmark; color: @color-bi-text-redmark;
} }
} }

10
src/less/base/single/tip/tip.toast.less

@ -6,18 +6,18 @@
min-width: 150px; min-width: 150px;
.border-radius(2px); .border-radius(2px);
&.toast-success{ &.toast-success{
background: @color-bi-background-success; background: @color-bi-background-toast-success;
} }
&.toast-warning{ &.toast-warning{
background: @color-bi-background-warning; background: @color-bi-background-toast-warning;
} }
&.toast-error{ &.toast-error{
background: @color-bi-background-failure; background: @color-bi-background-toast-error;
} }
&.toast-normal, &.toast-common{ &.toast-normal, &.toast-common{
background: @color-bi-background-highlight; background: @color-bi-background-toast-normal;
} }
& .toast-icon{ & .toast-icon{
font-size: 16px; font-size: @font-size-16;
} }
} }

8
src/less/base/single/tip/tip.tooltip.less

@ -8,12 +8,12 @@
font-size: 12px; font-size: 12px;
color: @color-bi-text; color: @color-bi-text;
&.tooltip-success{ &.tooltip-success{
background: @color-bi-tooltip-success-background; background: @color-bi-background-tooltip-success;
border: 1px solid @color-bi-tooltip-success-background; border: 1px solid @color-bi-border-tooltip-success;
} }
&.tooltip-warning{ &.tooltip-warning{
background: @color-bi-background-failure; background: @color-bi-background-tooltip-success;
border: 1px solid @color-bi-tooltip-failure-border; border: 1px solid @color-bi-border-tooltip-failure;
} }
} }

2
src/less/base/tree/tree.expander.less

@ -2,7 +2,7 @@
.bi-tree-expander-popup.line:before { .bi-tree-expander-popup.line:before {
position: absolute; position: absolute;
content: ""; content: "";
border-left: 1px dashed #D0D4DA; border-left: 1px dashed @color-bi-border-dark-gray-line;
height: 100%; height: 100%;
left: 11px; left: 11px;
} }

56
src/less/core/utils/common.less

@ -66,73 +66,73 @@
//基本背景 //基本背景
.bi-background { .bi-background {
background-color: @color-bi-background-normal; background-color: @color-bi-background-normal;
color: @color-bi-text-normal; color: @color-bi-text-background;
& .bi-input { & .bi-input {
color: @color-bi-text-normal; color: @color-bi-text-background;
} }
& .bi-textarea { & .bi-textarea {
color: @color-bi-text-normal; color: @color-bi-text-background;
} }
} }
.bi-theme-dark { .bi-theme-dark {
.bi-background { .bi-background {
background-color: @color-bi-background-normal-theme-dark; background-color: @color-bi-background-normal-theme-dark;
color: @color-bi-text-theme-dark; color: @color-bi-text-background-theme-dark;
& .bi-input { & .bi-input {
color: @color-bi-text-theme-dark; color: @color-bi-text-background-theme-dark;
} }
& .bi-textarea { & .bi-textarea {
color: @color-bi-text-theme-dark; color: @color-bi-text-background-theme-dark;
} }
} }
} }
.bi-header-background { .bi-header-background {
background-color: @color-bi-background-light-gray; background-color: @color-bi-background-header-background;
color: @color-bi-text-light-gray; color: @color-bi-text-header-background;
& .bi-input { & .bi-input {
color: @color-bi-text-light-gray; color: @color-bi-text-header-background;
} }
& .bi-textarea { & .bi-textarea {
color: @color-bi-text-light-gray; color: @color-bi-text-header-background;
} }
} }
.bi-theme-dark { .bi-theme-dark {
.bi-header-background { .bi-header-background {
background-color: @color-bi-background-light-gray-theme-dark; background-color: @color-bi-background-header-background-theme-dark;
color: @color-bi-text-light-gray-theme-dark; color: @color-bi-text-header-background-theme-dark;
& .bi-input { & .bi-input {
color: @color-bi-text-light-gray-theme-dark; color: @color-bi-text-header-background-theme-dark;
} }
& .bi-textarea { & .bi-textarea {
color: @color-bi-text-light-gray-theme-dark; color: @color-bi-text-header-background-theme-dark;
} }
} }
} }
//card //card
.bi-card { .bi-card {
background-color: @color-bi-background-default; background-color: @color-bi-background-card;
color: @color-bi-text-normal; color: @color-bi-text-card;
& .bi-input { & .bi-input {
color: @color-bi-text-normal; color: @color-bi-text-card;
} }
& .bi-textarea { & .bi-textarea {
color: @color-bi-text-normal; color: @color-bi-text-card;
} }
} }
.bi-theme-dark { .bi-theme-dark {
.bi-card { .bi-card {
background-color: @color-bi-background-default-theme-dark; background-color: @color-bi-background-card-theme-dark;
color: @color-bi-text-theme-dark; color: @color-bi-text-card-theme-dark;
& .bi-input { & .bi-input {
color: @color-bi-text-theme-dark; color: @color-bi-text-card-theme-dark;
} }
& .bi-textarea { & .bi-textarea {
color: @color-bi-text-theme-dark; color: @color-bi-text-card-theme-dark;
} }
} }
} }
@ -415,25 +415,25 @@
// 水印 // 水印
.bi-water-mark { .bi-water-mark {
color: @font-color-tips; color: @color-bi-text-water-mark;
cursor: text; cursor: text;
.user-select-disable(); .user-select-disable();
& .bi-input { & .bi-input {
color: @font-color-tips; color: @color-bi-text-water-mark;
} }
& .bi-textarea { & .bi-textarea {
color: @font-color-tips; color: @color-bi-text-water-mark;
} }
} }
.bi-theme-dark { .bi-theme-dark {
.bi-water-mark { .bi-water-mark {
color: @font-color-tips-theme-dark; color: @color-bi-text-water-mark-theme-dark;
& .bi-input { & .bi-input {
color: @font-color-tips-theme-dark; color: @color-bi-text-water-mark-theme-dark;
} }
& .bi-textarea { & .bi-textarea {
color: @font-color-tips-theme-dark; color: @color-bi-text-water-mark-theme-dark;
} }
} }
} }

1
src/less/index.less

@ -4,3 +4,4 @@
@import "visual"; @import "visual";
@import "var"; @import "var";
@import "lib/colors"; @import "lib/colors";
@import "lib/theme";

19
src/less/lib/colors.less

@ -1,6 +1,6 @@
@import "constant"; @import "constant";
// 色彩库,从constant.less中获取相关颜色,不要出现#xxxxxx // 通用色彩库。从constant.less中获取相关颜色,不要出现#xxxxxx
//默认字体颜色 //默认字体颜色
@color-bi-text-normal: @font-color-normal; @color-bi-text-normal: @font-color-normal;
@ -32,6 +32,8 @@
@color-bi-icon-disabled-theme-dark: @font-color-light-disabled-theme-dark; @color-bi-icon-disabled-theme-dark: @font-color-light-disabled-theme-dark;
//提示字体颜色 //提示字体颜色
@color-bi-text-tips: @font-color-tips; @color-bi-text-tips: @font-color-tips;
//深色主题提示字体颜色
@color-bi-text-tips-theme-dark: @font-color-tips-theme-dark;
//成功字体颜色 //成功字体颜色
@color-bi-text-success: @font-color-success; @color-bi-text-success: @font-color-success;
//失败字体颜色 //失败字体颜色
@ -104,6 +106,10 @@
@color-bi-border-line: @border-color-line; @color-bi-border-line: @border-color-line;
//深色主题边框线色 //深色主题边框线色
@color-bi-border-line-theme-dark: @border-color-line-theme-dark; @color-bi-border-line-theme-dark: @border-color-line-theme-dark;
//深灰色边框线
@color-bi-border-dark-gray-line: @border-color-dark-gray-line;
//深灰色主题深色边框线
@color-bi-border-dark-gray-line-theme-dark: @border-color-dark-gray-line-theme-dark;
//深色边框线 //深色边框线
@color-bi-border-dark-line: @border-color-dark-line; @color-bi-border-dark-line: @border-color-dark-line;
//深色主题深色边框线 //深色主题深色边框线
@ -121,17 +127,6 @@
//边框提亮 //边框提亮
@color-bi-border-highlight: @border-color-highlight; @color-bi-border-highlight: @border-color-highlight;
//tooltip
//成功背景
@color-bi-tooltip-success-background: @background-color-normal-success;
//成功边框
@color-bi-tooltip-success-border: @border-color-normal-success;
//失败边框
@color-bi-tooltip-failure-border: @border-color-negative;
//mask颜色
@color-bi-button-mask: @color-bi-background-black;
//颜色百分比 //颜色百分比
//green //green
@color-bi-green-80: fade(@font-color-success, 80); @color-bi-green-80: fade(@font-color-success, 80);

15
src/less/lib/constant.less

@ -1,8 +1,5 @@
//常量库 // 基础配色方案,业务无关
//font size
//classified
//
@font-size-12: 12px; @font-size-12: 12px;
@font-size-13: 13px; @font-size-13: 13px;
@font-size-14: 14px; @font-size-14: 14px;
@ -92,8 +89,10 @@
@border-color-line-theme-dark: #363e55; @border-color-line-theme-dark: #363e55;
@border-color-light-line: #f2f4f7; @border-color-light-line: #f2f4f7;
@border-color-light-line-theme-dark: #292f45; @border-color-light-line-theme-dark: #292f45;
@border-color-dark-line: #9EA6B2; @border-color-dark-gray-line: #d0d4da;
@border-color-dark-line-theme-dark: #878D9F; @border-color-dark-gray-line-theme-dark: #606479;
@border-color-dark-line: #9ea6b2;
@border-color-dark-line-theme-dark: #878d9f;
@border-color-highlight: #3685f2; @border-color-highlight: #3685f2;
@border-color-warning: #fbb03b; @border-color-warning: #fbb03b;
@ -111,5 +110,3 @@
@scroll-color-theme-dark: #ffffff; @scroll-color-theme-dark: #ffffff;
@scroll-thumb-color: #232e40; @scroll-thumb-color: #232e40;
@scroll-thumb-color-theme-dark: #232e40; @scroll-thumb-color-theme-dark: #232e40;
@water-mark-color-theme-dark: #878d9f;

52
src/less/lib/theme.less

@ -0,0 +1,52 @@
@import "colors";
// 专属组件色彩库,通用配色中有的用通用配色,否则选constant自定义配色
//tooltip
//成功背景(专属配色)
@color-bi-background-tooltip-success: @background-color-normal-success;
//成功边框(专属配色)
@color-bi-border-tooltip-success: @border-color-normal-success;
//失败背景
@color-bi-background-tooltip-success: @color-bi-background-failure;
//失败边框
@color-bi-border-tooltip-failure: @color-bi-border-failure;
//按钮的mask颜色
@color-bi-background-button-mask: @color-bi-background-black;
//水印字体颜色
@color-bi-text-water-mark: @color-bi-text-tips;
@color-bi-text-water-mark-theme-dark: @color-bi-text-tips-theme-dark;
//toast
@color-bi-background-toast-success: @color-bi-background-success;
@color-bi-background-toast-warning: @color-bi-background-warning;
@color-bi-background-toast-error: @color-bi-background-failure;
@color-bi-background-toast-normal: @color-bi-background-highlight;
//bubble
@color-bi-background-bubble-success: @color-bi-background-light-success;
@color-bi-background-bubble-warning: @color-bi-background-light-warning;
@color-bi-background-bubble-error: @color-bi-background-light-failure;
@color-bi-background-bubble-error-theme-dark: @color-bi-background-dark-failure;
@color-bi-background-bubble-normal: @color-bi-background-light-highlight;
//bi-background背景
@color-bi-background-background: @color-bi-background-normal;
@color-bi-background-background-theme-dark: @color-bi-background-normal-theme-dark;
@color-bi-text-background: @color-bi-text-normal;
@color-bi-text-background-theme-dark: @color-bi-text-theme-dark;
//bi-header-background背景
@color-bi-background-header-background: @color-bi-background-light-gray;
@color-bi-background-header-background-theme-dark: @color-bi-background-light-gray-theme-dark;
@color-bi-text-header-background: @color-bi-text-light-gray;
@color-bi-text-header-background-theme-dark: @color-bi-text-light-gray-theme-dark;
//bi-card卡片
@color-bi-background-card: @color-bi-background-default;
@color-bi-background-card-theme-dark: @color-bi-background-default-theme-dark;
@color-bi-text-card: @color-bi-text-normal;
@color-bi-text-card-theme-dark: @color-bi-text-theme-dark;

2
src/less/widget/dynamicdatecombo/dynamicdatetime.combo.less

@ -2,6 +2,6 @@
.bi-dynamic-date-combo { .bi-dynamic-date-combo {
& .date-font { & .date-font {
font-size: 16px; font-size: @font-size-16;
} }
} }

2
src/less/widget/multilayerselecttree/multilayerselecttree.combo.less

@ -2,7 +2,7 @@
@val: transform .3s ease; @val: transform .3s ease;
.bi-multilayer-select-tree-combo { .bi-multilayer-select-tree-combo {
& .trigger-icon-button{ & .trigger-icon-button{
font-size: 16px; font-size: @font-size-16;
} }
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 // 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { & .bi-combo.bi-combo-popup + .bi-trigger-icon-button {

2
src/less/widget/multilayersingletree/multilayersingletree.combo.less

@ -2,7 +2,7 @@
@val: transform .3s ease; @val: transform .3s ease;
.bi-multilayer-single-tree-combo { .bi-multilayer-single-tree-combo {
& .trigger-icon-button{ & .trigger-icon-button{
font-size: 16px; font-size: @font-size-16;
} }
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 // 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { & .bi-combo.bi-combo-popup + .bi-trigger-icon-button {

2
src/less/widget/multiselect/multiselect.insert.combo.less

@ -2,7 +2,7 @@
@val: transform .3s ease; @val: transform .3s ease;
.bi-multi-select-insert-combo{ .bi-multi-select-insert-combo{
& .multi-select-trigger-icon-button{ & .multi-select-trigger-icon-button{
font-size: 16px; font-size: @font-size-16;
} }
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 // 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { & .bi-combo.bi-combo-popup + .bi-trigger-icon-button {

2
src/less/widget/multitree/multi.tree.combo.less

@ -2,7 +2,7 @@
@val: transform .3s ease; @val: transform .3s ease;
.bi-multi-tree-combo{ .bi-multi-tree-combo{
& .multi-select-trigger-icon-button{ & .multi-select-trigger-icon-button{
font-size: 16px; font-size: @font-size-16;
} }
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 // 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { & .bi-combo.bi-combo-popup + .bi-trigger-icon-button {

4
src/less/widget/numbereditor/number.editor.less

@ -3,9 +3,9 @@
.bi-number-editor { .bi-number-editor {
.border-radius(2px); .border-radius(2px);
& .pull-down-font { & .pull-down-font {
font-size: 12px; font-size: @font-size-12;
} }
& .pull-up-font { & .pull-up-font {
font-size: 12px; font-size: @font-size-12;
} }
} }

2
src/less/widget/searchmultiselect/searchmultiselect.less

@ -2,7 +2,7 @@
.bi-search-multi-text-value-combo{ .bi-search-multi-text-value-combo{
& .multi-select-trigger-icon-button{ & .multi-select-trigger-icon-button{
font-size: 16px; font-size: @font-size-16;
} }
&.combo-error { &.combo-error {
& .bi-multi-select-searcher { & .bi-multi-select-searcher {

2
src/less/widget/singleselect/singleselect.combo.less

@ -2,7 +2,7 @@
@val: transform .3s ease; @val: transform .3s ease;
.bi-single-select-combo{ .bi-single-select-combo{
& .single-select-trigger-icon-button{ & .single-select-trigger-icon-button{
font-size: 16px; font-size: @font-size-16;
} }
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 // 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { & .bi-combo.bi-combo-popup + .bi-trigger-icon-button {

2
src/less/widget/timecombo/timecombo.less

@ -3,6 +3,6 @@
.bi-time-trigger{ .bi-time-trigger{
& .show-text { & .show-text {
// ie10一下无背景色会鼠标穿透 // ie10一下无背景色会鼠标穿透
.background-color(@background-color-default, 0); .background-color(@color-bi-background-default, 0);
} }
} }
Loading…
Cancel
Save