Skip to content

Commit 6f11254

Browse files
Ashwini KumbleAshwini Kumble
authored andcommitted
demographics updated
1 parent 827707c commit 6f11254

3 files changed

Lines changed: 43 additions & 95 deletions

File tree

Lines changed: 42 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,56 @@
1-
#gender .mantine-InputWrapper-label,
2-
#age .mantine-InputWrapper-label,
3-
#education .mantine-InputWrapper-label,
4-
#gender .mantine-InputWrapper-label .mantine-Text-root,
5-
#age .mantine-InputWrapper-label .mantine-Text-root,
6-
#education .mantine-InputWrapper-label .mantine-Text-root {
7-
font-size: 0.88rem !important;
8-
--text-fz: 0.88rem !important;
9-
line-height: 1.12 !important;
1+
html, body {
2+
margin: 0;
3+
padding: 0;
4+
overflow-x: hidden;
105
}
116

12-
#gender .mantine-Radio-label,
13-
#age .mantine-Radio-label,
14-
#education .mantine-Radio-label,
15-
#gender .mantine-Input-input,
16-
#age .mantine-Input-input,
17-
#education .mantine-Input-input,
18-
#gender .mantine-InputWrapper-description,
19-
#age .mantine-InputWrapper-description,
20-
#education .mantine-InputWrapper-description {
21-
font-size: 0.79rem !important;
22-
--text-fz: 0.79rem !important;
23-
line-height: 1.12 !important;
24-
}
25-
26-
#gender .no-last-child-bottom-padding :is(p, li),
27-
#age .no-last-child-bottom-padding :is(p, li),
28-
#education .no-last-child-bottom-padding :is(p, li) {
29-
margin-bottom: 0.125rem;
30-
}
31-
32-
#gender .mantine-Group-root,
33-
#age .mantine-Group-root,
34-
#education .mantine-Group-root {
35-
gap: 0.25rem !important;
7+
/* Center the whole demographics block */
8+
#gender,
9+
#age {
10+
width: 100%;
11+
max-width: 900px;
12+
margin-left: auto;
13+
margin-right: auto;
14+
padding-left: 1rem;
15+
padding-right: 1rem;
16+
box-sizing: border-box;
3617
}
3718

38-
#gender.response,
39-
#age.response,
40-
#education.response {
41-
margin-bottom: 0.4rem !important;
19+
/* Trim Mantine's built-in spacing that can cause a few extra px */
20+
#gender .mantine-InputWrapper-root,
21+
#age .mantine-InputWrapper-root {
22+
margin-bottom: 0 !important;
23+
padding-bottom: 0 !important;
4224
}
4325

44-
#gender .mantine-InputWrapper-root,
45-
#age .mantine-InputWrapper-root,
46-
#education .mantine-InputWrapper-root {
47-
--input-margin-top: 0.15rem;
26+
#gender .mantine-Stack-root,
27+
#age .mantine-Stack-root {
28+
padding-bottom: 0 !important;
29+
margin-bottom: 0 !important;
4830
}
4931

50-
#gender .mantine-Radio-root,
51-
#age .mantine-Radio-root,
52-
#education .mantine-Radio-root {
53-
margin-top: 0.05rem !important;
54-
margin-bottom: 0.05rem !important;
32+
/* Radio options: force vertical list (column) */
33+
#gender .mantine-Group-root,
34+
#age .mantine-Group-root {
35+
display: flex !important;
36+
flex-direction: column !important;
37+
align-items: flex-start !important;
38+
justify-content: flex-start !important;
39+
flex-wrap: nowrap !important;
40+
gap: 0.35rem !important; /* use gap instead of row-gap */
5541
}
5642

43+
/* If Stack is wrapping sections, make it single column */
5744
#gender .mantine-Stack-root,
58-
#age .mantine-Stack-root,
59-
#education .mantine-Stack-root {
45+
#age .mantine-Stack-root {
6046
display: grid !important;
61-
grid-template-columns: repeat(2, minmax(250px, 320px));
62-
justify-content: start;
63-
column-gap: 0.35rem !important;
64-
row-gap: 0.15rem !important;
65-
}
66-
67-
#gender .mantine-Stack-root > div,
68-
#age .mantine-Stack-root > div,
69-
#education .mantine-Stack-root > div {
70-
min-width: 0;
47+
grid-template-columns: 1fr !important;
48+
justify-content: stretch;
49+
row-gap: 0.35rem !important;
7150
}
7251

73-
#gender .mantine-Input-input,
74-
#age .mantine-Input-input,
75-
#education .mantine-Input-input {
76-
width: 100%;
77-
}
52+
/* Prevent long labels from stretching horizontally */
53+
#gender .mantine-Radio-label,
54+
#age .mantine-Radio-label {
55+
white-space: normal !important;
56+
}

public/color-palette-study/config.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -127,22 +127,6 @@
127127
"65 years or older",
128128
"Prefer not to say"
129129
]
130-
},
131-
{
132-
"id": "education",
133-
"prompt": "What is the **highest degree or level of education** you have completed?",
134-
"required": true,
135-
"location": "aboveStimulus",
136-
"type": "radio",
137-
"withOther": true,
138-
"stylesheetPath": "color-palette-study/assets/demographics-compact.css",
139-
"options": [
140-
"Less than high school",
141-
"High school diploma or equivalent",
142-
"Bachelor's degree or equivalent",
143-
"Master's degree or equivalent",
144-
"Doctoral degree or equivalent"
145-
]
146130
}
147131
]
148132
},

public/libraries/demographics/config.json

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "questionnaire",
77
"description": "Basic demographic questions including gender, age, and education",
88
"style": {
9-
"fontSize": "10px"
9+
"fontSize": "12px"
1010
},
1111
"response": [
1212
{
@@ -41,21 +41,6 @@
4141
"65 years or older",
4242
"Prefer not to say"
4343
]
44-
},
45-
{
46-
"id": "education",
47-
"prompt": "What is the **highest degree or level of education** you have completed?",
48-
"required": true,
49-
"location": "aboveStimulus",
50-
"type": "radio",
51-
"withOther": true,
52-
"options": [
53-
"Less than high school",
54-
"High school diploma or equivalent",
55-
"Bachelor's degree or equivalent",
56-
"Master's degree or equivalent",
57-
"Doctoral degree or equivalent"
58-
]
5944
}
6045
]
6146
}

0 commit comments

Comments
 (0)