Skip to content

Update theme color handling and improve viewport settings for better responsiveness#13

Open
dzhukovsky wants to merge 3 commits into
mainfrom
fix/iphone-top-header
Open

Update theme color handling and improve viewport settings for better responsiveness#13
dzhukovsky wants to merge 3 commits into
mainfrom
fix/iphone-top-header

Conversation

@dzhukovsky
Copy link
Copy Markdown
Owner

This pull request improves the handling of theme colors and safe area insets to provide a better user experience, especially on devices with notches and when switching between light and dark themes. The most important changes are:

Theme color improvements:

  • Updated the index.html to set different theme-color meta tags for light and dark modes using media queries.
  • Enhanced the useTheme hook in src/lib/hooks.ts to dynamically update all theme-color meta tags when the theme changes, ensuring the browser UI matches the selected theme.

Safe area support:

  • Added viewport-fit=cover to the viewport meta tag in index.html to support full-bleed layouts on devices with display notches.
  • Updated the SiteHeader component in src/components/site-header.tsx to add padding using env(safe-area-inset-top), preventing content from overlapping with device notches.

@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-wave-0c3faae03-13.westeurope.5.azurestaticapps.net

@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-wave-0c3faae03-13.westeurope.5.azurestaticapps.net

@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-wave-0c3faae03-13.westeurope.5.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant