mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Fix styling for cards when no cover is defined (#2261)
This commit is contained in:
@@ -33,10 +33,7 @@ export async function RecordCard(
|
||||
'z-0',
|
||||
'relative',
|
||||
'grid',
|
||||
'grid-cols-[40%,_1fr]',
|
||||
'bg-light',
|
||||
'min-[432px]:grid-cols-none',
|
||||
'min-[432px]:grid-rows-[auto,1fr]',
|
||||
'w-[calc(100%+2px)]',
|
||||
'h-[calc(100%+2px)]',
|
||||
'inset-[-1px]',
|
||||
@@ -44,6 +41,14 @@ export async function RecordCard(
|
||||
'straight-corners:rounded-none',
|
||||
'overflow-hidden',
|
||||
'dark:bg-dark',
|
||||
cover
|
||||
? [
|
||||
// On mobile, the cover is displayed on the left with 40% of the width
|
||||
'grid-cols-[40%,_1fr]',
|
||||
'min-[432px]:grid-cols-none',
|
||||
'min-[432px]:grid-rows-[auto,1fr]',
|
||||
]
|
||||
: null,
|
||||
)}
|
||||
>
|
||||
{cover ? (
|
||||
|
||||
Reference in New Issue
Block a user