Skip to content

Commit b08a7dd

Browse files
committed
render roulette
1 parent 46d2af7 commit b08a7dd

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

render-roulette/css/index.css

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ body {
1212
margin: 0;
1313
padding: 1rem; /* Prevents text from hitting edges */
1414
box-sizing: border-box;
15+
font-size: 1rem; /* Base size to prevent unexpected upscaling */
16+
-webkit-text-size-adjust: 100%; /* Prevent Safari from auto-scaling text */
17+
text-size-adjust: 100%; /* Standard property */
1518
}
1619

1720
/* Title adjustments */
@@ -62,37 +65,38 @@ body {
6265
opacity: 1;
6366
}
6467

65-
/* Responsive: Medium screens (tablets, landscape mobile) */
66-
@media (max-width: 1024px) {
68+
69+
70+
/* Adjust media queries to better detect mobile devices */
71+
@media (max-width: 1024px), (pointer: coarse) {
6772
#output {
68-
font-size: 2.5rem;
73+
font-size: 2.5rem; /* Scale down slightly for touchscreens */
6974
}
7075

7176
#title, #instructions {
72-
font-size: 0.875rem;
77+
font-size: 0.875rem; /* Adjust smaller text elements */
7378
}
7479
}
7580

76-
/* Responsive: Small screens (portrait mobile) */
77-
@media (max-width: 768px) {
81+
@media (max-width: 900px), (pointer: coarse) {
7882
#output {
7983
font-size: 2rem;
80-
max-width: 90vw; /* Prevents horizontal cut-off */
84+
max-width: 90vw; /* Prevent text from hitting screen edges */
8185
}
8286

8387
#title, #instructions {
8488
font-size: 0.75rem;
8589
}
8690
}
8791

88-
/* Responsive: Wide but short screens (landscape mobile) */
89-
@media (max-width: 900px) and (max-height: 450px) {
92+
/* Mobile-specific styles with extra width buffer */
93+
@media (max-width: 850px), (max-device-width: 850px), (pointer: coarse) {
9094
#output {
91-
font-size: 1.8rem; /* Scale down text for landscape */
95+
font-size: 1.8rem; /* Further scaling for small screens */
9296
max-height: 75vh;
9397
}
9498

9599
#title, #instructions {
96100
font-size: 0.7rem;
97101
}
98-
}
102+
}

render-roulette/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<!-- Custom JavaScript -->
2929
<script defer src="js/prompts.js"></script>
3030
<script defer src="js/generate_prompt.js"></script>
31+
<meta name="viewport" content="width=device-width, initial-scale=1">
3132
</head>
3233
<body>
3334
<div id="container">

0 commit comments

Comments
 (0)