Skip to content

Commit 9fbe134

Browse files
committed
fix: Improve image clarity and CSS modules for BMDashboard cards
1 parent bf875ac commit 9fbe134

4 files changed

Lines changed: 59 additions & 11 deletions

File tree

src/components/BMDashboard/BMDashboard.module.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,4 +617,27 @@
617617
color: #ffffff !important;
618618
}
619619

620+
/* Image clarity improvements for BMDashboard */
621+
.bm-dashboard-container img,
622+
.bm-dashboard-dark img,
623+
.bm-dashboard-light img {
624+
image-rendering: auto !important;
625+
-webkit-filter: none !important;
626+
filter: none !important;
627+
backface-visibility: hidden !important;
628+
transform: translateZ(0) !important;
629+
-webkit-font-smoothing: antialiased !important;
630+
-moz-osx-font-smoothing: grayscale !important;
631+
}
632+
633+
.bm-dashboard-container .single-card__img img,
634+
.bm-dashboard-dark .single-card__img img,
635+
.bm-dashboard-light .single-card__img img {
636+
object-fit: cover !important;
637+
object-position: center !important;
638+
max-width: 100% !important;
639+
height: auto !important;
640+
image-rendering: auto !important;
641+
}
642+
620643

src/components/BMDashboard/Projects/ProjectDetails/Materials/MaterialCard.jsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1+
import styles from '../ProjectDetails.module.css';
2+
13
function MaterialCard() {
24
return (
3-
<div className="single-card">
4-
<div className="single-card__img">
5+
<div className={styles['single-card']}>
6+
<div className={styles['single-card__img']}>
57
<img
6-
alt=""
8+
alt="Material"
79
src="https://www.theforkliftcenter.com/images/forklift-hero-left.png"
810
width="100%"
11+
style={{
12+
imageRendering: 'auto',
13+
filter: 'none',
14+
objectFit: 'cover',
15+
maxWidth: '100%',
16+
height: 'auto',
17+
}}
918
/>
1019
</div>
11-
<div className="single-card__body">
20+
<div className={styles['single-card__body']}>
1221
<h3>Card title</h3>
13-
<div className="single-card__info">Less than ___% left</div>
22+
<div className={styles['single-card__info']}>Less than ___% left</div>
1423
</div>
1524
</div>
1625
);

src/components/BMDashboard/Projects/ProjectDetails/ProjectDetails.module.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,19 @@
191191
justify-content: center;
192192
align-items: center;
193193
overflow: hidden;
194+
background-color: #ffffff;
195+
border-radius: 5px 5px 0 0;
194196
}
195197

196198
.single-card__img img {
197199
max-width: 100%;
198200
height: auto;
199-
object-fit: contain;
201+
object-fit: cover;
202+
image-rendering: auto;
203+
filter: none;
204+
-webkit-filter: none;
205+
backface-visibility: hidden;
206+
transform: translateZ(0);
200207
}
201208

202209
.single-card:hover {

src/components/BMDashboard/Projects/ProjectDetails/RentedTools/ToolCard.jsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1+
import styles from '../ProjectDetails.module.css';
2+
13
function ToolCard() {
24
return (
3-
<div className="single-card">
4-
<div className="single-card__img">
5+
<div className={styles['single-card']}>
6+
<div className={styles['single-card__img']}>
57
<img
6-
alt=""
8+
alt="Equipment"
79
src="https://www.theforkliftcenter.com/images/forklift-hero-left.png"
810
width="100%"
11+
style={{
12+
imageRendering: 'auto',
13+
filter: 'none',
14+
objectFit: 'cover',
15+
maxWidth: '100%',
16+
height: 'auto',
17+
}}
918
/>
1019
</div>
11-
<div className="single-card__body">
20+
<div className={styles['single-card__body']}>
1221
<h3>Card title</h3>
13-
<div className="single-card__info">Term ends in __ hours.</div>
22+
<div className={styles['single-card__info']}>Term ends in __ hours.</div>
1423
</div>
1524
</div>
1625
);

0 commit comments

Comments
 (0)