[compnents] TItemCard, css 수정

Detail Notes :

1. videoShow 타입에서 imageWrap의 width, height 설정
This commit is contained in:
younghoon100.park
2024-03-19 19:11:01 +09:00
parent f377bd2409
commit 4e19792652
2 changed files with 25 additions and 23 deletions

View File

@@ -119,14 +119,12 @@ export default memo(function TItemCard({
)} )}
</div> </div>
{isBestSeller && rank && ( {isBestSeller && rank && (
<div> <div className={css.bestSeller}>
{STRING_CONF.TOP} {STRING_CONF.TOP}
<span>{rank}</span> <span>{rank}</span>
</div> </div>
)} )}
{isLive && ( {isLive && <img className={css.liveTag} src={IcLiveShow} alt="" />}
<CustomImage className={css.liveTag} src={IcLiveShow} alt="" />
)}
</SpottableComponent> </SpottableComponent>
); );
}); });

View File

@@ -1,9 +1,8 @@
@import "../../style/CommonStyle.module.less"; @import "../../style/CommonStyle.module.less";
@import "../../style/utils.module.less"; @import "../../style/utils.module.less";
/* horizontal type */ /* horizontal */
.horizontal { .horizontal {
/* normal */
display: flex; display: flex;
.size(@w: 660px, @h: 236px); .size(@w: 660px, @h: 236px);
padding: 18px; padding: 18px;
@@ -11,8 +10,7 @@
border: solid 1px @COLOR_GRAY02; border: solid 1px @COLOR_GRAY02;
background-color: @COLOR_WHITE; background-color: @COLOR_WHITE;
// left contents (image contetns) .imageWrap {
> div:nth-child(1) {
position: relative; position: relative;
.size(@w: 200px, @h: 200px); .size(@w: 200px, @h: 200px);
margin-right: 20px; margin-right: 20px;
@@ -47,8 +45,7 @@
} }
} }
// right contents .descWrap {
> div:nth-child(2) {
.flex(@direction: column, @justifyCenter: space-between, @alignCenter: flex-start); .flex(@direction: column, @justifyCenter: space-between, @alignCenter: flex-start);
flex-grow: 1; flex-grow: 1;
width: 404px; width: 404px;
@@ -88,7 +85,7 @@
} }
} }
/* focused */ // focused
&:focus { &:focus {
&::after { &::after {
.focused(@boxShadow:22px, @borderRadius:12px); .focused(@boxShadow:22px, @borderRadius:12px);
@@ -96,9 +93,8 @@
} }
} }
/* vertical type (Thumbnail) */ /* vertical */
.vertical { .vertical {
/* normal */
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -108,8 +104,7 @@
border: solid 1px @COLOR_GRAY02; border: solid 1px @COLOR_GRAY02;
background-color: @COLOR_WHITE; background-color: @COLOR_WHITE;
// top contents (image contetns) .imageWrap {
> div:nth-child(1) {
position: relative; position: relative;
.size(@w: 288px, @h: 288px); .size(@w: 288px, @h: 288px);
margin-bottom: 6px; margin-bottom: 6px;
@@ -134,7 +129,7 @@
} }
// sold out // sold out
> div:nth-child(3) { > div {
.position(@position: absolute, @top: 0, @right: 0); .position(@position: absolute, @top: 0, @right: 0);
.flex(); .flex();
.size(@w: 288px, @h: 288px); .size(@w: 288px, @h: 288px);
@@ -144,8 +139,7 @@
} }
} }
// bottom contents .descWrap {
> div:nth-child(2) {
.flex(@direction: column, @alignCenter: flex-start); .flex(@direction: column, @alignCenter: flex-start);
flex-grow: 1; flex-grow: 1;
@@ -186,8 +180,8 @@
} }
} }
// best seller (TOP mark) // best seller
> div:nth-child(3) { .bestSeller {
.position(@position: absolute, @top: -1px, @left: 18px); .position(@position: absolute, @top: -1px, @left: 18px);
.flex(@direction: column, @justifyCenter: space-between); .flex(@direction: column, @justifyCenter: space-between);
padding: 15px 16px 21px; padding: 15px 16px 21px;
@@ -203,7 +197,7 @@
} }
} }
/* focused */ // focused
&:focus { &:focus {
&::after { &::after {
.focused(@boxShadow: 22px, @borderRadius: 12px); .focused(@boxShadow: 22px, @borderRadius: 12px);
@@ -218,6 +212,7 @@
/* videoShow */ /* videoShow */
.videoShow { .videoShow {
// horizontal
&.imgHorizontal { &.imgHorizontal {
.size(@w: 546px, @h:438px); .size(@w: 546px, @h:438px);
padding: 18px; padding: 18px;
@@ -240,8 +235,10 @@
} }
} }
.imageWrap { .imageWrap {
> img {
.size(@w: 100%, @h: 288px); .size(@w: 100%, @h: 288px);
> img {
.size(@w: inherit, @h: inherit);
object-fit: cover; object-fit: cover;
} }
} }
@@ -261,6 +258,8 @@
} }
} }
} }
// vertical
&.imgVertical { &.imgVertical {
.size(@w: 546px, @h:438px); .size(@w: 546px, @h:438px);
padding: 18px; padding: 18px;
@@ -270,11 +269,13 @@
font-weight: bold; font-weight: bold;
position: relative; position: relative;
display: flex; display: flex;
&:focus { &:focus {
&::after { &::after {
.focused(@boxShadow: 22px, @borderRadius: 12px); .focused(@boxShadow: 22px, @borderRadius: 12px);
} }
} }
&.nonPosition { &.nonPosition {
&:focus { &:focus {
&::after { &::after {
@@ -282,10 +283,13 @@
} }
} }
} }
.imageWrap { .imageWrap {
flex: none; flex: none;
> img {
.size(@w: 228px, @h: 402px); .size(@w: 228px, @h: 402px);
> img {
.size(@w: inherit, @h: inherit);
object-fit: cover; object-fit: cover;
} }
} }