Skip to content

Commit

Permalink
refactor(theme): [hrapprover] refactor hrapprover theme vars (#2328)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcr authored Oct 21, 2024
1 parent 2930ff0 commit 9a52d9c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
28 changes: 14 additions & 14 deletions packages/theme/src/hrapprover/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@input-prefix-cls: ~'@{css-prefix}input';

.@{hrapprover-prefix-cls} {
.component-css-vars-hrapprover();
.inject-Hrapprover-vars();

& &__list {
height: 180px;
Expand All @@ -26,21 +26,21 @@
}

& &__error {
border: solid 1px var(--ti-hrapprover-error-border-color);
border: solid 1px var(--tv-Hrapprover-error-border-color);
}

table {
tbody {
tr {
color: var(--ti-hrapprover-table-text-color);
background: var(--ti-hrapprover-tr-bg-color);
color: var(--tv-Hrapprover-table-text-color);
background: var(--tv-Hrapprover-tr-bg-color);

&:hover {
background: var(--ti-hrapprover-tr-hover-bg-color);
background: var(--tv-Hrapprover-tr-hover-bg-color);
}

&:nth-child(odd) {
background: var(--ti-hrapprover-tr-odd-bg-color);
background: var(--tv-Hrapprover-tr-odd-bg-color);
}
}
}
Expand All @@ -54,27 +54,27 @@
th {
border-left: none;
padding: 2px 0 2px 8px;
height: var(--ti-hrapprover-th-height);
height: var(--tv-Hrapprover-th-height);
}

td {
padding: 2px 0 2px 8px;
height: var(--ti-hrapprover-th-height);
font-size: var(--ti-hrapprover-table-font-size);
height: var(--tv-Hrapprover-th-height);
font-size: var(--tv-Hrapprover-table-font-size);
}

thead {
border-bottom: 1px solid var(--ti-hrapprover-thead-border-color);
border-bottom: 1px solid var(--tv-Hrapprover-thead-border-color);
text-align: left;
background: var(--ti-hrapprover-thead-bg-color);
color: var(--ti-hrapprover-table-text-color);
background: var(--tv-Hrapprover-thead-bg-color);
color: var(--tv-Hrapprover-table-text-color);

th {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: var(--ti-hrapprover-table-font-size);
color: var(--ti-hrapprover-table-text-color);
font-size: var(--tv-Hrapprover-table-font-size);
color: var(--tv-Hrapprover-table-text-color);
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions packages/theme/src/hrapprover/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
*
*/

.component-css-vars-hrapprover() {
--ti-hrapprover-error-border-color: var(--ti-base-color-bg-8, #c7000b);
--ti-hrapprover-table-text-color: var(--ti-common-color-info-normal, #191919);
--ti-hrapprover-table-font-size: var(--ti-common-font-size-base, 14px);
--ti-hrapprover-tr-bg-color: #fafafa;
--ti-hrapprover-tr-hover-bg-color: var(--ti-common-color-hover-background, #f5f5f5);
--ti-hrapprover-tr-odd-bg-color: var(--ti-common-color-light, #ffffff);
--ti-hrapprover-th-height: var(--ti-common-size-height-small, 24px);
--ti-hrapprover-thead-border-color: var(--ti-common-color-border, #999999);
--ti-hrapprover-thead-bg-color: #f1f1f1;
.inject-Hrapprover-vars() {
--tv-Hrapprover-error-border-color: var(--tv-color-error-bg);
--tv-Hrapprover-table-text-color: var(--tv-color-text);
--tv-Hrapprover-table-font-size: var(--tv-font-size-md);
--tv-Hrapprover-tr-bg-color: var(--tv-color-bg-gray-1);
--tv-Hrapprover-tr-hover-bg-color: var(--tv-color-bg-hover);
--tv-Hrapprover-tr-odd-bg-color: var(--tv-color-bg-secondary);
--tv-Hrapprover-th-height: var(--tv-size-height-xs);
--tv-Hrapprover-thead-border-color: var(--tv-color-border);
--tv-Hrapprover-thead-bg-color: var(--tv-color-bg-header);
}

0 comments on commit 9a52d9c

Please sign in to comment.