|
191 | 191 |
|
192 | 192 | /* --- Key changes for the Week/Quiz tab buttons (Brain Cache & Mindmash) --- */ |
193 | 193 | .tab-nav { |
194 | | - flex-wrap: wrap; /* Allow buttons to wrap to the next line */ |
195 | | - justify-content: center; /* Center the wrapped buttons */ |
196 | | - padding: 5px 0; /* Adjust padding if needed, make sure it doesn't push content out */ |
| 194 | + /* Prevents wrapping and enables horizontal scrolling */ |
| 195 | + flex-wrap: nowrap; /* Forces all items onto a single line */ |
| 196 | + overflow-x: auto; /* Enables horizontal scrolling when content overflows */ |
| 197 | + -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS devices */ |
| 198 | + justify-content: flex-start; /* Align buttons to the start of the scrollable area */ |
| 199 | + padding: 5px; /* Adjust padding as needed */ |
| 200 | + width: 100%; /* Ensure it takes full width to enable proper scrolling */ |
| 201 | + box-sizing: border-box; /* Include padding in width calculation */ |
197 | 202 | } |
198 | 203 |
|
199 | 204 | .tab-button { |
200 | | - flex: 0 0 48%; /* Each button takes up slightly less than half the width, allowing two per row */ |
201 | | - max-width: 48%; /* Ensure it doesn't grow beyond this */ |
202 | | - box-sizing: border-box; /* Include padding and border in the width calculation */ |
203 | | - margin: 4px 1%; /* Small margin between and around buttons for spacing */ |
204 | | - padding: 8px 5px; /* Slightly reduce internal padding */ |
205 | | - font-size: 0.85em; /* Slightly smaller font for readability */ |
| 205 | + /* Prevent shrinking below content size and maintain some minimum width */ |
| 206 | + flex-shrink: 0; /* Prevents buttons from shrinking */ |
| 207 | + min-width: fit-content; /* Allows button to be as wide as its content */ |
| 208 | + padding: 8px 12px; /* Maintain good padding */ |
| 209 | + margin: 0 4px; /* Add horizontal spacing between buttons */ |
| 210 | + font-size: 0.9em; /* Slightly smaller font for more buttons on screen */ |
206 | 211 | } |
207 | 212 |
|
208 | | - /* Override the first/last child border-radius if they conflict with wrapping */ |
209 | | - .tab-button:first-child, |
| 213 | + /* Remove any specific first/last child styling if it interferes with uniform appearance in a scrollable row */ |
| 214 | + .tab-button:first-child { |
| 215 | + margin-left: 0; /* No left margin for the first button in the row */ |
| 216 | + } |
210 | 217 | .tab-button:last-child { |
211 | | - border-radius: 6px; /* Apply consistent border-radius when wrapping */ |
| 218 | + margin-right: 0; /* No right margin for the last button in the row */ |
212 | 219 | } |
213 | 220 |
|
214 | 221 | /* General mini-window adjustments for small screens */ |
|
0 commit comments