Browse Source

整理样式

es6
guy 3 years ago
parent
commit
39f18b37f3
  1. 2
      src/less/base/single/button/button.less
  2. 10
      src/less/base/single/tip/tip.bubble.less
  3. 10
      src/less/base/single/tip/tip.toast.less
  4. 8
      src/less/base/single/tip/tip.tooltip.less
  5. 56
      src/less/core/utils/common.less
  6. 1
      src/less/index.less
  7. 17
      src/less/lib/colors.less
  8. 4
      src/less/lib/constant.less
  9. 52
      src/less/lib/theme.less

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 {
&:after {
content: "";
background-color: @color-bi-button-mask;
background-color: @color-bi-background-button-mask;
.border-radius(10px);
display: block;
width: 100%;

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

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

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

@ -6,18 +6,18 @@
min-width: 150px;
.border-radius(2px);
&.toast-success{
background: @color-bi-background-success;
background: @color-bi-background-toast-success;
}
&.toast-warning{
background: @color-bi-background-warning;
background: @color-bi-background-toast-warning;
}
&.toast-error{
background: @color-bi-background-failure;
background: @color-bi-background-toast-error;
}
&.toast-normal, &.toast-common{
background: @color-bi-background-highlight;
background: @color-bi-background-toast-normal;
}
& .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;
color: @color-bi-text;
&.tooltip-success{
background: @color-bi-tooltip-success-background;
border: 1px solid @color-bi-tooltip-success-background;
background: @color-bi-background-tooltip-success;
border: 1px solid @color-bi-border-tooltip-success;
}
&.tooltip-warning{
background: @color-bi-background-failure;
border: 1px solid @color-bi-tooltip-failure-border;
background: @color-bi-background-tooltip-success;
border: 1px solid @color-bi-border-tooltip-failure;
}
}

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

@ -66,73 +66,73 @@
//基本背景
.bi-background {
background-color: @color-bi-background-normal;
color: @color-bi-text-normal;
color: @color-bi-text-background;
& .bi-input {
color: @color-bi-text-normal;
color: @color-bi-text-background;
}
& .bi-textarea {
color: @color-bi-text-normal;
color: @color-bi-text-background;
}
}
.bi-theme-dark {
.bi-background {
background-color: @color-bi-background-normal-theme-dark;
color: @color-bi-text-theme-dark;
color: @color-bi-text-background-theme-dark;
& .bi-input {
color: @color-bi-text-theme-dark;
color: @color-bi-text-background-theme-dark;
}
& .bi-textarea {
color: @color-bi-text-theme-dark;
color: @color-bi-text-background-theme-dark;
}
}
}
.bi-header-background {
background-color: @color-bi-background-light-gray;
color: @color-bi-text-light-gray;
background-color: @color-bi-background-header-background;
color: @color-bi-text-header-background;
& .bi-input {
color: @color-bi-text-light-gray;
color: @color-bi-text-header-background;
}
& .bi-textarea {
color: @color-bi-text-light-gray;
color: @color-bi-text-header-background;
}
}
.bi-theme-dark {
.bi-header-background {
background-color: @color-bi-background-light-gray-theme-dark;
color: @color-bi-text-light-gray-theme-dark;
background-color: @color-bi-background-header-background-theme-dark;
color: @color-bi-text-header-background-theme-dark;
& .bi-input {
color: @color-bi-text-light-gray-theme-dark;
color: @color-bi-text-header-background-theme-dark;
}
& .bi-textarea {
color: @color-bi-text-light-gray-theme-dark;
color: @color-bi-text-header-background-theme-dark;
}
}
}
//card
.bi-card {
background-color: @color-bi-background-default;
color: @color-bi-text-normal;
background-color: @color-bi-background-card;
color: @color-bi-text-card;
& .bi-input {
color: @color-bi-text-normal;
color: @color-bi-text-card;
}
& .bi-textarea {
color: @color-bi-text-normal;
color: @color-bi-text-card;
}
}
.bi-theme-dark {
.bi-card {
background-color: @color-bi-background-default-theme-dark;
color: @color-bi-text-theme-dark;
background-color: @color-bi-background-card-theme-dark;
color: @color-bi-text-card-theme-dark;
& .bi-input {
color: @color-bi-text-theme-dark;
color: @color-bi-text-card-theme-dark;
}
& .bi-textarea {
color: @color-bi-text-theme-dark;
color: @color-bi-text-card-theme-dark;
}
}
}
@ -415,25 +415,25 @@
// 水印
.bi-water-mark {
color: @font-color-tips;
color: @color-bi-text-water-mark;
cursor: text;
.user-select-disable();
& .bi-input {
color: @font-color-tips;
color: @color-bi-text-water-mark;
}
& .bi-textarea {
color: @font-color-tips;
color: @color-bi-text-water-mark;
}
}
.bi-theme-dark {
.bi-water-mark {
color: @font-color-tips-theme-dark;
color: @color-bi-text-water-mark-theme-dark;
& .bi-input {
color: @font-color-tips-theme-dark;
color: @color-bi-text-water-mark-theme-dark;
}
& .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 "var";
@import "lib/colors";
@import "lib/theme";

17
src/less/lib/colors.less

@ -1,6 +1,6 @@
@import "constant";
// 色彩库,业务相关。从constant.less中获取相关颜色,不要出现#xxxxxx
// 通用色彩库。从constant.less中获取相关颜色,不要出现#xxxxxx
//默认字体颜色
@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-text-tips: @font-color-tips;
//深色主题提示字体颜色
@color-bi-text-tips-theme-dark: @font-color-tips-theme-dark;
//成功字体颜色
@color-bi-text-success: @font-color-success;
//失败字体颜色
@ -125,19 +127,6 @@
//边框提亮
@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;
@water-mark-color-theme-dark: @background-color-light-disabled-theme-dark;
//颜色百分比
//green
@color-bi-green-80: fade(@font-color-success, 80);

4
src/less/lib/constant.less

@ -91,8 +91,8 @@
@border-color-light-line-theme-dark: #292f45;
@border-color-dark-gray-line: #d0d4da;
@border-color-dark-gray-line-theme-dark: #606479;
@border-color-dark-line: #9EA6B2;
@border-color-dark-line-theme-dark: #878D9F;
@border-color-dark-line: #9ea6b2;
@border-color-dark-line-theme-dark: #878d9f;
@border-color-highlight: #3685f2;
@border-color-warning: #fbb03b;

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;
Loading…
Cancel
Save