Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions platforms/metagram/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}

body {
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Improve safe-area padding with fallbacks and shorthand

To ensure broader browser support (including legacy iOS Safari) and simplify maintenance, add constant() fallbacks and consolidate the four individual declarations into a single shorthand with default values. Also align indentation with the project’s tab style. For example:

 body {
-       padding-top: env(safe-area-inset-top);
-       padding-bottom: env(safe-area-inset-bottom);
-       padding-left: env(safe-area-inset-left);
-       padding-right: env(safe-area-inset-right);
+       /* Legacy WebKit support */
+       padding-top: constant(safe-area-inset-top);
+       padding-right: constant(safe-area-inset-right);
+       padding-bottom: constant(safe-area-inset-bottom);
+       padding-left: constant(safe-area-inset-left);
+       /* Standard with fallbacks (0px) */
+       padding: env(safe-area-inset-top, 0px)
+               env(safe-area-inset-right, 0px)
+               env(safe-area-inset-bottom, 0px)
+               env(safe-area-inset-left, 0px);
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
body {
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
body {
/* Legacy WebKit support */
padding-top: constant(safe-area-inset-top);
padding-right: constant(safe-area-inset-right);
padding-bottom: constant(safe-area-inset-bottom);
padding-left: constant(safe-area-inset-left);
/* Standard with fallbacks (0px) */
padding: env(safe-area-inset-top, 0px)
env(safe-area-inset-right, 0px)
env(safe-area-inset-bottom, 0px)
env(safe-area-inset-left, 0px);
}
🤖 Prompt for AI Agents
In platforms/metagram/src/app.css around lines 11 to 16, the safe-area padding
uses only env() which lacks fallback support for legacy browsers. Replace the
four separate padding properties with a single padding shorthand that includes
constant() fallbacks for each side and default values. Also, adjust the
indentation to match the project's tab style for consistency.


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
Expand Down
Loading