style(Sku): simplify goods info style

This commit is contained in:
chenjiahan 2020-06-26 17:21:32 +08:00 committed by neverland
parent 0ea2938d72
commit 1b15c6066e
2 changed files with 5 additions and 20 deletions

View File

@ -72,14 +72,7 @@ function SkuHeader(
{slots['sku-header-image-extra']?.()} {slots['sku-header-image-extra']?.()}
</div> </div>
)} )}
<div <div class={bem('goods-info')}>{slots.default?.()}</div>
class={[
bem('goods-info'),
!showHeaderImage && bem('goods-info--no-padding'),
]}
>
{slots.default?.()}
</div>
</div> </div>
); );
} }

View File

@ -25,17 +25,15 @@
} }
&-header { &-header {
display: flex;
margin: 0 @padding-md; margin: 0 @padding-md;
&__img-wrap { &__img-wrap {
position: relative; position: relative;
float: left;
width: 96px; width: 96px;
height: 96px; height: 96px;
margin: @padding-sm 0; margin: @padding-sm @padding-sm @padding-sm 0;
overflow: hidden;
background: @background-color; background: @background-color;
border-radius: @border-radius-md;
img { img {
position: absolute; position: absolute;
@ -46,6 +44,7 @@
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
margin: auto; margin: auto;
border-radius: @border-radius-md;
} }
} }
@ -53,14 +52,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
box-sizing: border-box; padding: @padding-sm 20px @padding-sm 0;
min-height: 96px;
padding: @padding-sm 20px @padding-sm @padding-xs;
overflow: hidden;
&--no-padding {
padding-left: 0;
}
} }
} }