Skip to content

Commit 2fefadd

Browse files
fix(card): [card] Style pollution caused by modifying the card component (#2910)
1 parent 352b7dd commit 2fefadd

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

examples/sites/demos/pc/app/card/card-select-composition-api.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,12 @@ const dataArr = ref([
159159
.card-stlecting {
160160
border-top: 1px solid rgba(0, 0, 0, 0.05);
161161
}
162-
</style>
163-
164-
<style>
165-
#smb-card .tiny-card--small-padding {
162+
#smb-card :deep(.tiny-card--small-padding) {
166163
padding: 0;
167164
}
165+
.card-wrap :deep(.tiny-input__inner) {
166+
border: none;
167+
border-radius: 6px;
168+
background-color: #fafafa;
169+
}
168170
</style>

examples/sites/demos/pc/app/card/card-select.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,12 @@ export default {
169169
.card-stlecting {
170170
border-top: 1px solid rgba(0, 0, 0, 0.05);
171171
}
172-
</style>
173-
174-
<style>
175-
#smb-card .tiny-card--small-padding {
172+
#smb-card :deep(.tiny-card--small-padding) {
176173
padding: 0;
177174
}
175+
.card-wrap :deep(.tiny-input__inner) {
176+
border: none;
177+
border-radius: 6px;
178+
background-color: #fafafa;
179+
}
178180
</style>

packages/theme/src/card/index.less

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
@import './vars.less';
1515

1616
@card-prefix-cls: ~'@{css-prefix}card';
17-
@input-prefix-cls: ~'@{css-prefix}input';
1817

1918
.@{card-prefix-cls} {
2019
.inject-Card-vars();
@@ -289,11 +288,4 @@
289288
}
290289
}
291290
}
292-
.@{input-prefix-cls} {
293-
&__inner {
294-
border: none;
295-
border-radius: 6px;
296-
background-color: #fafafa;
297-
}
298-
}
299291
}

0 commit comments

Comments
 (0)