Skip to content

Commit

Permalink
🐛 [Page] Fix Toast centering on Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 22, 2024
1 parent 662c219 commit 04811ff
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/layouts/Page.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import '@styles/utility.css';
import {TOAST_TMPL_ID} from '@data/app';
import Toast from '@components/Toast.astro';
import ToastTest from '@mock/ToastTest.astro';
interface Props {
id: string;
title?: string;
Expand Down Expand Up @@ -108,14 +110,19 @@ const OG_IMAGE = '/assets/dulmage-social.png';
<template id={TOAST_TMPL_ID}>
<Toast id="ToastPlaceholder" />
</template>

<ToastTest />
</body>
</html>

<style>
/* Horizontal centering is required for Toast components */
/*
Horizontal centering is required for Toast components.
`display grid / justify-items` does not work correctly in Safari.
*/
body {
display: grid;
justify-items: center;
display: flex;
justify-content: center;
}
</style>

Expand Down

0 comments on commit 04811ff

Please sign in to comment.