-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHome.css
More file actions
187 lines (157 loc) · 4.23 KB
/
Copy pathHome.css
File metadata and controls
187 lines (157 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/* Home.css */
/* Base styles for the content wrapper */
.content-wrapper {
display: flex;
flex-direction: column;
min-height: 100vh; /* Ensure full viewport height */
width: 100%;
max-width: 1200px; /* Max width for larger screens */
margin: 0 auto; /* Center content */
padding: 1rem; /* Padding for breathing room */
box-sizing: border-box; /* Include padding in width calculations */
}
/* Chatbot container */
.chatbot-container {
width: 100%;
margin-bottom: 1rem; /* Space between components */
}
/* Tracker container */
.tracker-container {
width: 100%;
flex-grow: 1; /* Allow TrackerHome to take remaining space */
}
/* Hide chatbot on mobile if needed (replacing display: none) */
@media (max-width: 768px) {
.chatbot-container {
display: none; /* Hide by default on mobile, adjust as needed */
}
}
/* Ensure components are touch-friendly and readable on mobile */
@media (max-width: 768px) {
.content-wrapper {
padding: 0.5rem; /* Reduced padding on smaller screens */
}
/* Ensure font sizes are readable */
body {
font-size: 16px; /* Base font size for accessibility */
}
/* Make buttons and interactive elements touch-friendly */
button,
a,
input,
textarea {
min-height: 44px; /* Minimum touch target size per accessibility guidelines */
min-width: 44px;
font-size: 1rem; /* Readable text */
}
}
/* Styles for larger screens (optional side-by-side layout) */
@media (min-width: 769px) {
.content-wrapper {
flex-direction: row; /* Side-by-side layout for larger screens */
gap: 1rem; /* Space between chatbot and tracker */
}
.chatbot-container {
display: block; /* Ensure chatbot is visible on larger screens */
width: 30%; /* Adjust width as needed */
min-width: 250px; /* Minimum width for chatbot */
}
.tracker-container {
width: 70%; /* Adjust width as needed */
}
}
/* Accessibility and general styles */
:focus {
outline: 2px solid #007bff; /* Visible focus for accessibility */
outline-offset: 2px;
}
/* Prevent horizontal scrolling */
html,
body {
overflow-x: hidden;
width: 100%;
}
/* Ensure images and mediaGreetings, I'm here to help! I'm not sure what you mean by "images," so I'll assume you're referring to visual elements like those in `MyChatBot` or `TrackerHome`. If you have specific images or other visual elements, please provide more details, and I can tailor the response further.
Based on the provided code, I'll focus on ensuring that any visual elements (like buttons, icons, or images within `MyChatBot` or `TrackerHome`) are responsive and mobile-friendly. Here's how the CSS handles images and other visual elements:
### Updated `Home.css` (with Image Handling)
```css
/* Home.css */
/* Base styles for the content wrapper */
.content-wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 1rem;
box-sizing: border-box;
}
/* Chatbot container */
.chatbot-container {
width: 100%;
margin-bottom: 1rem;
}
/* Tracker container */
.tracker-container {
width: 100%;
flex-grow: 1;
}
/* Responsive images */
img {
max-width: 100%; /* Ensure images scale within their container */
height: auto; /* Maintain aspect ratio */
display: block; /* Prevent inline spacing issues */
}
/* Mobile-specific styles */
@media (max-width: 768px) {
.content-wrapper {
padding: 0.5rem;
}
.chatbot-container {
display: none; /* Hide chatbot on mobile, adjust as needed */
}
body {
font-size: 16px;
}
/* Touch-friendly buttons and interactive elements */
button,
a,
input,
textarea {
min-height: 44px;
min-width: 44px;
font-size: 1rem;
}
/* Adjust images for smaller screens */
img {
max-width: 90vw; /* Slightly smaller than viewport width */
margin: 0 auto; /* Center images */
}
}
/* Desktop-specific styles */
@media (min-width: 769px) {
.content-wrapper {
flex-direction: row;
gap: 1rem;
}
.chatbot-container {
display: block;
width: 30%;
min-width: 250px;
}
.tracker-container {
width: 70%;
}
}
/* Accessibility */
:focus {
outline: 2px solid #007bff;
outline-offset: 2px;
}
/* Prevent horizontal scrolling */
html,
body {
overflow-x: hidden;
width: 100%;
}