From fca6e17c10a9a737c5fae7417eec89701446875a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 9 Jan 2022 16:58:23 +0100 Subject: refactor(styles): use compose to declare grid layouts once I'm using same grid layouts in multiple places. To avoid maintenance issue, I think it is better to declare the grid once and to import its declaration where it is needed. Thanks to CSS modules, I can use compose to do that. --- src/components/PostHeader/PostHeader.module.scss | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/components/PostHeader') diff --git a/src/components/PostHeader/PostHeader.module.scss b/src/components/PostHeader/PostHeader.module.scss index 9997ec3..c5a818c 100644 --- a/src/components/PostHeader/PostHeader.module.scss +++ b/src/components/PostHeader/PostHeader.module.scss @@ -2,11 +2,7 @@ @use "@styles/abstracts/mixins" as mix; .wrapper { - display: grid; - grid-template-columns: - minmax(0, 1fr) min(calc(100vw - calc(var(--spacing-md) * 2)), 80ch) - minmax(0, 1fr); - align-items: center; + composes: grid from "@styles/layout/_grid.scss"; max-width: 100%; margin-bottom: var(--spacing-md); background: var(--color-bg-secondary); -- cgit v1.2.3