Skip to content

Commit e6a46b4

Browse files
committed
feat: add some less var
1 parent 9d1e5d7 commit e6a46b4

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed

components/style/mixins/modal-mask.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pointer-events: none;
55

66
&.@{ant-prefix}-zoom-enter,
7-
&.@{ant-prefix}zoom-appear {
7+
&.@{ant-prefix}-zoom-appear {
88
transform: none; // reset scale avoid mousePosition bug
99
opacity: 0;
1010
animation-duration: @animation-duration-slow;

components/style/themes/dark.less

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,11 @@
447447
// Mentions
448448
// ---
449449
@mentions-dropdown-bg: @popover-background;
450+
451+
// Segmented
452+
// ---
453+
@segmented-bg: fade(@black, 25%);
454+
@segmented-hover-bg: fade(@black, 45%);
455+
@segmented-selected-bg: #333333;
456+
@segmented-label-color: fade(@white, 65%);
457+
@segmented-label-hover-color: fade(@white, 85%);

components/style/themes/default.less

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,12 @@
525525
// Tooltip background color
526526
@tooltip-bg: rgba(0, 0, 0, 0.75);
527527
// Tooltip arrow width
528-
@tooltip-arrow-width: 5px;
528+
@tooltip-arrow-width: 8px * sqrt(2);
529529
// Tooltip distance with trigger
530530
@tooltip-distance: @tooltip-arrow-width - 1px + 4px;
531531
// Tooltip arrow color
532532
@tooltip-arrow-color: @tooltip-bg;
533+
@tooltip-border-radius: @border-radius-base;
533534

534535
// Popover
535536
// ---
@@ -541,7 +542,7 @@
541542
@popover-min-width: 177px;
542543
@popover-min-height: 32px;
543544
// Popover arrow width
544-
@popover-arrow-width: 6px;
545+
@popover-arrow-width: @tooltip-arrow-width;
545546
// Popover arrow color
546547
@popover-arrow-color: @popover-bg;
547548
// Popover outer arrow width
@@ -677,6 +678,7 @@
677678

678679
// Tag
679680
// --
681+
@tag-border-radius: @border-radius-base;
680682
@tag-default-bg: @background-color-light;
681683
@tag-default-color: @text-color;
682684
@tag-font-size: @font-size-sm;
@@ -873,7 +875,7 @@
873875
@breadcrumb-font-size: @font-size-base;
874876
@breadcrumb-icon-font-size: @font-size-base;
875877
@breadcrumb-link-color: @text-color-secondary;
876-
@breadcrumb-link-color-hover: @primary-5;
878+
@breadcrumb-link-color-hover: @text-color;
877879
@breadcrumb-separator-color: @text-color-secondary;
878880
@breadcrumb-separator-margin: 0 @padding-xs;
879881

@@ -1071,3 +1073,11 @@
10711073
@image-preview-operation-size: 18px;
10721074
@image-preview-operation-color: @text-color-dark;
10731075
@image-preview-operation-disabled-color: fade(@image-preview-operation-color, 25%);
1076+
1077+
// Segmented
1078+
// ---
1079+
@segmented-bg: fade(@black, 4%);
1080+
@segmented-hover-bg: fade(@black, 6%);
1081+
@segmented-selected-bg: @white;
1082+
@segmented-label-color: fade(@black, 65%);
1083+
@segmented-label-hover-color: #262626;

components/style/themes/variable.less

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@base-primary: @blue-6;
1313

14-
html {
14+
@{html-selector} {
1515
// ========= Primary Color =========
1616
--@{ant-prefix}-primary-color: @base-primary;
1717
--@{ant-prefix}-primary-color-hover: color(~`colorPalette('@{base-primary}', 5) `);
@@ -227,7 +227,7 @@ html {
227227

228228
// Border color
229229
@border-color-base: hsv(0, 0, 85%); // base border outline a component
230-
@border-color-split: hsv(0, 0, 94%); // split border inside a component
230+
@border-color-split: rgba(0, 0, 0, 0.06); // split border inside a component
231231
@border-color-inverse: @white;
232232
@border-width-base: 1px; // width of the border for a component
233233
@border-style-base: solid; // style of a components border
@@ -580,11 +580,12 @@ html {
580580
// Tooltip background color
581581
@tooltip-bg: rgba(0, 0, 0, 0.75);
582582
// Tooltip arrow width
583-
@tooltip-arrow-width: 5px;
583+
@tooltip-arrow-width: 8px * sqrt(2);
584584
// Tooltip distance with trigger
585585
@tooltip-distance: @tooltip-arrow-width - 1px + 4px;
586586
// Tooltip arrow color
587587
@tooltip-arrow-color: @tooltip-bg;
588+
@tooltip-border-radius: @border-radius-base;
588589

589590
// Popover
590591
// ---
@@ -596,7 +597,7 @@ html {
596597
@popover-min-width: 177px;
597598
@popover-min-height: 32px;
598599
// Popover arrow width
599-
@popover-arrow-width: 6px;
600+
@popover-arrow-width: @tooltip-arrow-width;
600601
// Popover arrow color
601602
@popover-arrow-color: @popover-bg;
602603
// Popover outer arrow width
@@ -635,7 +636,7 @@ html {
635636
// Progress
636637
// --
637638
@progress-default-color: @processing-color;
638-
@progress-remaining-color: @background-color-base;
639+
@progress-remaining-color: rgba(0, 0, 0, 0.04);
639640
@progress-info-text-color: @progress-text-color;
640641
@progress-radius: 100px;
641642
@progress-steps-item-bg: #f3f3f3;
@@ -732,6 +733,7 @@ html {
732733

733734
// Tag
734735
// --
736+
@tag-border-radius: @border-radius-base;
735737
@tag-default-bg: @background-color-light;
736738
@tag-default-color: @text-color;
737739
@tag-font-size: @font-size-sm;
@@ -928,7 +930,7 @@ html {
928930
@breadcrumb-font-size: @font-size-base;
929931
@breadcrumb-icon-font-size: @font-size-base;
930932
@breadcrumb-link-color: @text-color-secondary;
931-
@breadcrumb-link-color-hover: @primary-5;
933+
@breadcrumb-link-color-hover: @text-color;
932934
@breadcrumb-separator-color: @text-color-secondary;
933935
@breadcrumb-separator-margin: 0 @padding-xs;
934936

@@ -1126,3 +1128,11 @@ html {
11261128
@image-preview-operation-size: 18px;
11271129
@image-preview-operation-color: @text-color-dark;
11281130
@image-preview-operation-disabled-color: fade(@image-preview-operation-color, 25%);
1131+
1132+
// Segmented
1133+
// ---
1134+
@segmented-bg: fade(@black, 4%);
1135+
@segmented-hover-bg: fade(@black, 6%);
1136+
@segmented-selected-bg: @white;
1137+
@segmented-label-color: fade(@black, 65%);
1138+
@segmented-label-hover-color: #262626;

0 commit comments

Comments
 (0)