Barazo default frontend barazo.forum
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(ui): center native dialog modals in viewport (#129)

* fix(ui): center native dialog modals in viewport

Tailwind's preflight resets margin to 0, which strips the browser's
default margin:auto centering on <dialog> elements opened via
showModal(). Add m-auto to both native dialog components.

* refactor: use global CSS rule for dialog centering instead of per-component

Move the margin:auto fix from individual dialog classNames to a global
rule in globals.css. This ensures all current and future native <dialog>
elements are centered without needing per-component overrides.

authored by

Guido X Jansen and committed by
GitHub
f17b202d 8c0a564f

+7
+7
src/app/globals.css
··· 233 233 max-width: 80rem; 234 234 } 235 235 236 + /* Restore centering for native <dialog> elements. 237 + Tailwind's preflight resets margin to 0, which strips the browser's 238 + default margin:auto that centers modal dialogs opened via showModal(). */ 239 + dialog { 240 + margin: auto; 241 + } 242 + 236 243 /* Base styles */ 237 244 * { 238 245 border-color: var(--color-border);