|
1 | 1 | @use '../../assets/styles/variables.scss' as *; |
2 | 2 |
|
3 | | -//아직 작업중 |
4 | 3 | h3 { |
5 | 4 | @include font-24-bold; |
6 | 5 | color: $gray-900; |
|
17 | 16 | margin: 43px 0px 16px 0px; |
18 | 17 | background-color: rgba(0, 0, 0, 0.12); |
19 | 18 | } |
| 19 | +.white { |
| 20 | + color: white; |
| 21 | +} |
20 | 22 |
|
21 | 23 | .card { |
22 | | - // position: relative; |
23 | | - overflow: hidden; // 넘치는 도형 잘리게 |
24 | | - // 카드 기본 스타일 |
| 24 | + overflow: hidden; // ::after 도형 잘리게 |
25 | 25 | min-width: 275px; |
26 | 26 | height: 260px; |
27 | 27 | padding: 30px 24px 20px 24px; |
28 | 28 | border: solid 1px rgba(0, 0, 0, 0.1); |
29 | 29 | border-radius: 16px; |
30 | | - background-color: $purple-200; //디폴트 배경색으로 가정 |
31 | 30 | background-size: cover; |
32 | 31 | background-repeat: no-repeat; |
33 | 32 | -webkit-filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 1)); |
|
36 | 35 | &::after { |
37 | 36 | content: ''; |
38 | 37 | position: absolute; |
39 | | - bottom: 0; |
40 | | - right: 0; |
41 | | - width: 150px; |
42 | | - height: 150px; |
43 | | - border-radius: 50%; |
44 | | - transform: translate(30%, 30%); |
45 | 38 | } |
46 | 39 | &.purple { |
47 | 40 | background: $purple-200; |
48 | 41 | } |
49 | 42 | &.purple::after { |
| 43 | + top: 124px; |
| 44 | + left: 133px; |
| 45 | + width: 336px; |
| 46 | + height: 169px; |
| 47 | + border-radius: 90.5px; |
50 | 48 | background: #dcb9ff66; |
51 | | - width: 150px; |
52 | | - height: 150px; |
53 | | - border-radius: 50%; |
54 | 49 | } |
55 | 50 | &.beige { |
56 | 51 | background-color: $beige-200; |
57 | 52 | } |
58 | 53 | &.beige::after { |
| 54 | + top: 124px; |
| 55 | + left: 154px; |
| 56 | + width: 332px; |
| 57 | + height: 318px; |
| 58 | + border-radius: 51px; |
59 | 59 | background: #ffd382b2; |
60 | 60 | } |
61 | 61 | &.blue { |
62 | 62 | background-color: $blue-200; |
63 | 63 | } |
64 | | - &.blue::after { |
65 | | - background: #9dddff; |
66 | | - transform: translate(20%, 40%) scale(1.2); |
| 64 | + .triangle { |
| 65 | + position: absolute; |
| 66 | + top: 82px; |
| 67 | + left: 110px; |
| 68 | + width: 250px; |
| 69 | + background-color: #9dddff; |
| 70 | + z-index: -1; |
| 71 | + --r: 35px; //border radius |
| 72 | + aspect-ratio: 1 / cos(30deg); |
| 73 | + --_g: calc(tan(60deg) * var(--r)) bottom var(--r), #000 98%, #0000 101%; |
| 74 | + -webkit-mask: //conic gradient: 중앙 영역 채움, radial gradients: 세 꼭짓점 |
| 75 | + conic-gradient( |
| 76 | + from -30deg at 50% calc(200% - 3 * var(--r) / 2), |
| 77 | + #000 60deg, |
| 78 | + #0000 0 |
| 79 | + ) |
| 80 | + 0 100%/100% calc(100% - 3 * var(--r) / 2) no-repeat, |
| 81 | + radial-gradient(var(--r) at 50% calc(2 * var(--r)), #000 98%, #0000 101%), |
| 82 | + radial-gradient(var(--r) at left var(--_g)), |
| 83 | + radial-gradient(var(--r) at right var(--_g)); |
| 84 | + mask: |
| 85 | + conic-gradient( |
| 86 | + from -30deg at 50% calc(200% - 3 * var(--r) / 2), |
| 87 | + #000 60deg, |
| 88 | + #0000 0 |
| 89 | + ) |
| 90 | + 0 100%/100% calc(100% - 3 * var(--r) / 2) no-repeat, |
| 91 | + radial-gradient(var(--r) at 50% calc(2 * var(--r)), #000 98%, #0000 101%), |
| 92 | + radial-gradient(var(--r) at left var(--_g)), |
| 93 | + radial-gradient(var(--r) at right var(--_g)); |
| 94 | + // 3포인트 폴리곤 |
| 95 | + -webkit-clip-path: polygon(50% 0, 100% 100%, 0 100%); |
| 96 | + clip-path: polygon(50% 0, 100% 100%, 0 100%); |
67 | 97 | } |
68 | 98 | &.green { |
69 | 99 | background-color: $green-200; |
70 | 100 | } |
71 | 101 | &.green::after { |
| 102 | + top: 124px; |
| 103 | + left: 133px; |
| 104 | + width: 336px; |
| 105 | + height: 169px; |
| 106 | + border-radius: 90.5px; |
72 | 107 | background: #9be2824d; |
73 | | - transform: translate(20%, 40%) scale(1.2); |
| 108 | + } |
| 109 | +} |
| 110 | + |
| 111 | +@media (min-width: 0px) and (max-width: 360px) { |
| 112 | + .card { |
| 113 | + min-width: 208px; |
| 114 | + height: 232px; |
| 115 | + } |
| 116 | + .card__centerline { |
| 117 | + margin-top: 33px; |
| 118 | + } |
| 119 | + h3 { |
| 120 | + @include font-18-bold; |
| 121 | + } |
| 122 | + .writer-count { |
| 123 | + @include font-14-regular; |
| 124 | + } |
| 125 | + .count { |
| 126 | + font-size: 1.4rem; |
74 | 127 | } |
75 | 128 | } |
0 commit comments