Skip to content

Commit 03f3709

Browse files
milooyyurimautofix-ci[bot]
authored
feat: TIL > 에디터 동적 높이계산, 마크다운 렌더러 스타일링 (#389)
* refactor: 불필요한 백업파일 삭제 * feat: 에디터 동적 높이계산 * feat: 마크다운 렌더러 스타일링 * feat: PostCard 컴포넌트 스타일 개선 및 텍스트 오버플로우 처리 * feat: PostCard 컴포넌트의 마크다운 요소 스타일 통일성 강화 * [autofix.ci] apply automated fixes --------- Co-authored-by: yurim <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 9efbf63 commit 03f3709

File tree

9 files changed

+284
-2129
lines changed

9 files changed

+284
-2129
lines changed

fundamentals/today-i-learned/src/api/hooks/useDiscussions.ts.bak

Lines changed: 0 additions & 500 deletions
This file was deleted.

fundamentals/today-i-learned/src/components/features/discussions/PostCard.tsx

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,21 @@ const postTitle = css({
250250
letterSpacing: "-0.4px",
251251
color: "#0F0F0F",
252252
transition: "colors 0.15s ease-in-out",
253+
overflow: "hidden",
254+
textOverflow: "ellipsis",
255+
whiteSpace: "nowrap",
253256
_hover: {
254257
color: "rgb(55, 65, 81)"
255258
}
256259
});
257260

258261
const contentPreview = css({
259262
display: "-webkit-box",
260-
WebkitLineClamp: "2",
263+
WebkitLineClamp: "3",
264+
// @ts-ignore
265+
WebkitBoxOrient: "vertical",
261266
overflow: "hidden",
267+
textOverflow: "ellipsis",
262268
transition: "colors 0.15s ease-in-out",
263269
_hover: {
264270
color: "rgba(0, 0, 0, 0.6)"
@@ -270,5 +276,58 @@ const markdownContent = css({
270276
fontSize: "16px",
271277
lineHeight: "160%",
272278
letterSpacing: "-0.4px",
273-
color: "rgba(0, 0, 0, 0.8)"
279+
color: "rgba(0, 0, 0, 0.8)",
280+
// PostCard에서 모든 마크다운 요소의 텍스트 크기를 균일하게 만들기
281+
"& h1, & h2, & h3, & h4, & h5, & h6": {
282+
fontSize: "16px !important",
283+
fontWeight: "500 !important",
284+
lineHeight: "160% !important",
285+
letterSpacing: "-0.4px !important",
286+
color: "rgba(0, 0, 0, 0.8) !important",
287+
margin: "0 !important"
288+
},
289+
"& p": {
290+
fontSize: "16px !important",
291+
fontWeight: "500 !important",
292+
lineHeight: "160% !important",
293+
letterSpacing: "-0.4px !important",
294+
color: "rgba(0, 0, 0, 0.8) !important",
295+
margin: "0 !important"
296+
},
297+
"& strong": {
298+
fontSize: "16px !important",
299+
fontWeight: "600 !important",
300+
color: "rgba(0, 0, 0, 0.8) !important"
301+
},
302+
"& em": {
303+
fontSize: "16px !important",
304+
fontStyle: "italic !important",
305+
color: "rgba(0, 0, 0, 0.8) !important"
306+
},
307+
"& ul, & ol": {
308+
margin: "0 !important",
309+
fontSize: "16px !important"
310+
},
311+
"& li": {
312+
fontSize: "16px !important",
313+
fontWeight: "500 !important",
314+
lineHeight: "160% !important",
315+
letterSpacing: "-0.4px !important",
316+
color: "rgba(0, 0, 0, 0.8) !important"
317+
},
318+
"& code": {
319+
fontSize: "14px !important",
320+
fontFamily: "monospace !important",
321+
backgroundColor: "#F5F5F5 !important",
322+
padding: "2px 4px !important",
323+
borderRadius: "4px !important"
324+
},
325+
"& blockquote": {
326+
fontSize: "16px !important",
327+
fontWeight: "500 !important",
328+
color: "rgba(0, 0, 0, 0.7) !important",
329+
margin: "0 !important",
330+
paddingLeft: "8px !important",
331+
borderLeft: "2px solid #D3D3D3 !important"
332+
}
274333
});

fundamentals/today-i-learned/src/components/features/discussions/PostCard.tsx.bak

Lines changed: 0 additions & 279 deletions
This file was deleted.

0 commit comments

Comments
 (0)