mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00

Yes, oddly enough this makes a performance difference. The translateZ was used as a trick to force ion-card’s rounded corners to take effect on inner elements. However, on a page that has many ion-cards, it takes relatively a lot of power on a low-end device to move them all during a transition. It’s best to not put them on their own layer and let the browser just move one thing.
37 lines
551 B
SCSS
37 lines
551 B
SCSS
@import "../../globals.core";
|
|
|
|
// Card
|
|
// --------------------------------------------------
|
|
|
|
|
|
ion-card {
|
|
display: block;
|
|
overflow: hidden;
|
|
}
|
|
|
|
ion-card img {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
ion-card-header {
|
|
display: block;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
ion-card-content {
|
|
display: block;
|
|
}
|
|
|
|
ion-card > :first-child {
|
|
border-top-left-radius: inherit;
|
|
border-top-right-radius: inherit;
|
|
}
|
|
|
|
ion-card > :last-child {
|
|
border-bottom-left-radius: inherit;
|
|
border-bottom-right-radius: inherit;
|
|
}
|