Skip to content

Commit 8f68802

Browse files
committed
render roulette
1 parent f6386db commit 8f68802

1 file changed

Lines changed: 48 additions & 10 deletions

File tree

render-roulette/css/index.css

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ body {
33
background-color: white;
44
color: black;
55
font-family: "Arial", sans-serif;
6-
font-size: 3rem;
76
display: flex;
87
align-items: center;
98
justify-content: center;
109
height: 100vh;
1110
text-align: center;
1211
cursor: pointer;
1312
margin: 0;
13+
padding: 1rem; /* Prevents text from hitting edges */
14+
box-sizing: border-box;
1415
}
1516

17+
/* Title adjustments */
1618
#title, #title a {
1719
text-decoration: none;
1820
position: absolute;
@@ -21,20 +23,19 @@ body {
2123
padding: 0.25rem;
2224
font-size: 1rem;
2325
color: #ccc;
24-
text-wrap-mode: nowrap;
26+
white-space: nowrap;
2527
}
2628

27-
29+
/* Instructions */
2830
#instructions {
2931
position: absolute;
3032
bottom: 0;
31-
/* centered horizontally */
3233
left: 50%;
3334
transform: translateX(-50%);
3435
padding: 1rem;
3536
font-size: 1rem;
36-
color: #888;
37-
transition: all 1s ease-in; /* Smooth fade */
37+
color: #888;
38+
transition: all 1s ease-in;
3839
}
3940

4041
#instructions:not(.show) {
@@ -44,17 +45,54 @@ body {
4445
/* Output container */
4546
#output {
4647
max-width: 80vw;
47-
word-break: break-word;
48+
max-height: 80vh; /* Prevents text from overflowing on short screens */
49+
font-size: 3rem;
50+
line-height: 1.2;
51+
overflow-wrap: break-word;
4852
}
4953

5054
/* Base state for prompt parts */
5155
.prompt-part {
5256
display: inline;
53-
opacity: 0; /* Start hidden */
54-
transition: all 1s ease-in; /* Smooth fade */
57+
opacity: 0;
58+
transition: all 1s ease-in;
5559
}
5660

57-
/* When the class is added, the transition takes effect */
5861
.show {
5962
opacity: 1;
6063
}
64+
65+
/* Responsive: Medium screens (tablets, landscape mobile) */
66+
@media (max-width: 1024px) {
67+
#output {
68+
font-size: 2.5rem;
69+
}
70+
71+
#title, #instructions {
72+
font-size: 0.875rem;
73+
}
74+
}
75+
76+
/* Responsive: Small screens (portrait mobile) */
77+
@media (max-width: 768px) {
78+
#output {
79+
font-size: 2rem;
80+
max-width: 90vw; /* Prevents horizontal cut-off */
81+
}
82+
83+
#title, #instructions {
84+
font-size: 0.75rem;
85+
}
86+
}
87+
88+
/* Responsive: Wide but short screens (landscape mobile) */
89+
@media (max-width: 900px) and (max-height: 450px) {
90+
#output {
91+
font-size: 1.8rem; /* Scale down text for landscape */
92+
max-height: 75vh;
93+
}
94+
95+
#title, #instructions {
96+
font-size: 0.7rem;
97+
}
98+
}

0 commit comments

Comments
 (0)