From 5c70404cb8c46cf8bbc0b2814b21fb961591d859 Mon Sep 17 00:00:00 2001 From: Sasha Chabin Date: Wed, 28 Aug 2024 04:39:38 +0500 Subject: [PATCH] Update default Card aspect-ratio --- client/components/Articles/Article/parseMarkdown.tsx | 2 +- client/components/MainPage/Card/Card.module.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/components/Articles/Article/parseMarkdown.tsx b/client/components/Articles/Article/parseMarkdown.tsx index 03b30d8..06d6d8e 100644 --- a/client/components/Articles/Article/parseMarkdown.tsx +++ b/client/components/Articles/Article/parseMarkdown.tsx @@ -15,7 +15,7 @@ export default function parseMarkdown(html) { md.renderer.rules.csc = (tokens, index) => { if (tokens[index].tag === 'card') { const props = parseToObject(tokens[index].markup); - tokens[index].content = renderToString(); + tokens[index].content = renderToString(); } return defaultCscBodyRender(tokens, index); diff --git a/client/components/MainPage/Card/Card.module.css b/client/components/MainPage/Card/Card.module.css index 06c27d6..6a65571 100644 --- a/client/components/MainPage/Card/Card.module.css +++ b/client/components/MainPage/Card/Card.module.css @@ -25,6 +25,7 @@ transition: .15s ease background-color, .15s ease background-image, .15s ease filter; overflow: hidden; position: relative; + aspect-ratio: 4 / 3; } /* Preload hover images */