Skip to content

Commit 0f6f87a

Browse files
feat: improve compact agenda readability
1 parent 27cd41c commit 0f6f87a

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

src/components/compact-agenda.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export const CompactAgenda: React.FC<{
153153
sx={{
154154
listStyle: "none",
155155
display: "grid",
156-
gap: ".4rem",
156+
gap: [".6rem", ".4rem"],
157157
m: 0,
158158
p: 0,
159159
}}
@@ -173,14 +173,17 @@ export const CompactAgenda: React.FC<{
173173
}}
174174
sx={{
175175
display: "grid",
176-
gridTemplateColumns: "4.2rem minmax(0, 1fr) auto",
176+
gridTemplateColumns: [
177+
"minmax(3.6rem, auto) minmax(0, 1fr) auto",
178+
"4.2rem minmax(0, 1fr) auto",
179+
],
177180
gridTemplateRows: "auto auto",
178181
alignItems: "start",
179-
gap: ".6rem",
180-
rowGap: ".15rem",
182+
columnGap: [".5rem", ".6rem"],
183+
rowGap: [".45rem", ".15rem"],
181184
minHeight: 0,
182-
px: ".75rem",
183-
py: ".5rem",
185+
px: [".85rem", ".75rem"],
186+
py: [".75rem", ".5rem"],
184187
border: "1px solid",
185188
borderColor:
186189
isCurrent || isNext ? "primary" : isDark ? "#3a2725" : "#eee",
@@ -205,9 +208,9 @@ export const CompactAgenda: React.FC<{
205208
<Text
206209
sx={{
207210
fontFamily: "heading",
208-
fontSize: "1.2rem",
211+
fontSize: ["1.25rem", "1.2rem"],
209212
fontWeight: "heading",
210-
lineHeight: 1,
213+
lineHeight: 1.1,
211214
color: isCurrent ? "white" : "primary",
212215
whiteSpace: "nowrap",
213216
gridColumn: 1,
@@ -220,18 +223,18 @@ export const CompactAgenda: React.FC<{
220223
<Box
221224
sx={{
222225
minWidth: 0,
223-
gridColumn: "2 / span 2",
224-
gridRow: "1 / span 2",
226+
gridColumn: ["1 / -1", "2 / span 2"],
227+
gridRow: [2, "1 / span 2"],
225228
textAlign: "left",
226229
}}
227230
>
228231
{speakers && (
229232
<Text
230233
sx={{
231234
display: "block",
232-
pr: isCurrent || isNext ? "4.1rem" : 0,
233-
fontSize: "1.1rem",
234-
lineHeight: 1,
235+
pr: [0, isCurrent || isNext ? "4.1rem" : 0],
236+
fontSize: ["1.1rem", "1.1rem"],
237+
lineHeight: 1.2,
235238
opacity: isCurrent ? 0.92 : 0.72,
236239
overflowWrap: "anywhere",
237240
}}
@@ -245,9 +248,9 @@ export const CompactAgenda: React.FC<{
245248
display: "block",
246249
mt: speakers ? ".2rem" : 0,
247250
fontFamily: "heading",
248-
fontSize: ["1.15rem", "1.3rem"],
251+
fontSize: ["1.35rem", "1.3rem"],
249252
fontWeight: "heading",
250-
lineHeight: 1.15,
253+
lineHeight: [1.22, 1.15],
251254
overflowWrap: "anywhere",
252255
}}
253256
>
@@ -259,7 +262,7 @@ export const CompactAgenda: React.FC<{
259262
sx={{
260263
alignItems: "center",
261264
justifyContent: "center",
262-
minWidth: "3.5rem",
265+
minWidth: ["3rem", "3.5rem"],
263266
gridColumn: 3,
264267
gridRow: 1,
265268
}}
@@ -273,7 +276,7 @@ export const CompactAgenda: React.FC<{
273276
backgroundColor: isCurrent ? "white" : "primary",
274277
color: isCurrent ? "primary" : "white",
275278
fontFamily: "heading",
276-
fontSize: ".9rem",
279+
fontSize: [".85rem", ".9rem"],
277280
fontWeight: "heading",
278281
lineHeight: 1,
279282
textTransform: "uppercase",

0 commit comments

Comments
 (0)