Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 11 additions & 0 deletions submissions/examples/mobile-alignment-fix/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Mobile Responsive Alignment Fix

Fixes the layout shifting and breaking bug where dashboard stats cards dropped their centered properties on narrow mobile screens.

## Resolution
- Implemented robust flexbox property overrides inside max-width media queries.
- Normalized child container structure metrics to use clean, auto-centering margins (`margin: 0 auto`).
- Verified zero left-border text clipping down to 320px viewports.

## Linked Issue
Closes #1232
15 changes: 15 additions & 0 deletions submissions/examples/mobile-alignment-fix/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mobile Alignment Fix Demo - #1232</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="pulse-stats-container">
<h2>CommitPulse Stats Dashboard</h2>
<p>This layout component adjusts dynamically to mobile viewports. Try shrinking your browser screen under 768px to verify the layout remains perfectly centered without breaking or clipping text layout boundaries.</p>
</div>
</body>
</html>
45 changes: 45 additions & 0 deletions submissions/examples/mobile-alignment-fix/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
body {
margin: 0;
padding: 0;
background-color: #0b0f19;
font-family: system-ui, -apple-system, sans-serif;
color: #f1f5f9;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.pulse-stats-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
max-width: 500px;
padding: 30px;
background: #111827;
border: 1px solid #1f2937;
border-radius: 12px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
text-align: center;
box-sizing: border-box;
}
.pulse-stats-container h2 {
margin: 0 0 10px 0;
color: #38bdf8;
}
.pulse-stats-container p {
margin: 0;
color: #9ca3af;
font-size: 0.95rem;
line-height: 1.6;
}
@media (max-width: 768px) {
.pulse-stats-container {
width: 90%;
margin: 0 auto;
padding: 20px;
align-items: center;
text-align: center;
}
}
Loading