Refactor CSS styles for improved layout and responsiveness
- Removed container-type from .road-container - Fixed dimensions for .road-car and .step-icon to fixed sizes - Adjusted positioning and dimensions for step labels - Updated padding and flex properties in .side-panel for better alignment - Refined font size variables for improved scaling on smaller screens
This commit is contained in:
parent
a02233f01d
commit
d5ea271eb6
33
assets/road-path-new-2.svg
Normal file
33
assets/road-path-new-2.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 76 KiB |
14
assets/road-path-new-3.svg
Normal file
14
assets/road-path-new-3.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 38 KiB |
File diff suppressed because one or more lines are too long
@ -246,7 +246,6 @@ body {
|
|||||||
.road-container {
|
.road-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
container-type: inline-size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SVG Road */
|
/* SVG Road */
|
||||||
@ -282,8 +281,8 @@ body {
|
|||||||
/* ── Moving Car (truck) ────────────────────── */
|
/* ── Moving Car (truck) ────────────────────── */
|
||||||
.road-car {
|
.road-car {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: clamp(36px, 8.73cqw, 88px);
|
width: 88px;
|
||||||
height: clamp(36px, 8.73cqw, 88px);
|
height: 88px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
/* JS will set left/top via transform */
|
/* JS will set left/top via transform */
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
@ -302,8 +301,8 @@ body {
|
|||||||
/* ── Step Icons ─────────────────────────────── */
|
/* ── Step Icons ─────────────────────────────── */
|
||||||
.step-icon {
|
.step-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: clamp(28px, 7.04cqw, 71px);
|
width: 71px;
|
||||||
height: clamp(28px, 7.04cqw, 71px);
|
height: 71px;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@ -381,10 +380,10 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.step-label--receive::before {
|
.step-label--receive::before {
|
||||||
right: -5.95cqw;
|
right: -60px;
|
||||||
bottom: 100%;
|
bottom: 100%;
|
||||||
width: calc(100% + 5.95cqw);
|
width: calc(100% + 60px);
|
||||||
height: 18.85cqw;
|
height: 190px;
|
||||||
border-bottom: 1.5px solid var(--navy);
|
border-bottom: 1.5px solid var(--navy);
|
||||||
border-right: 1.5px solid var(--navy);
|
border-right: 1.5px solid var(--navy);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@ -392,9 +391,9 @@ body {
|
|||||||
|
|
||||||
.step-label--inspect::before {
|
.step-label--inspect::before {
|
||||||
left: 0;
|
left: 0;
|
||||||
top: -0.99cqw;
|
top: -10px;
|
||||||
width: 1.5px;
|
width: 1.5px;
|
||||||
height: 35.71cqw;
|
height: 360px;
|
||||||
background-color: var(--navy);
|
background-color: var(--navy);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@ -403,16 +402,16 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: 100%;
|
bottom: 100%;
|
||||||
width: 1.5px;
|
width: 1.5px;
|
||||||
height: 39.68cqw;
|
height: 400px;
|
||||||
background-color: var(--navy);
|
background-color: var(--navy);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-label--hold::before {
|
.step-label--hold::before {
|
||||||
right: -5.95cqw;
|
right: -60px;
|
||||||
top: -0.99cqw;
|
top: -10px;
|
||||||
width: calc(100% + 5.95cqw);
|
width: calc(100% + 60px);
|
||||||
height: 22.82cqw;
|
height: 230px;
|
||||||
border-top: 1.5px solid var(--navy);
|
border-top: 1.5px solid var(--navy);
|
||||||
border-right: 1.5px solid var(--navy);
|
border-right: 1.5px solid var(--navy);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@ -422,7 +421,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: 100%;
|
bottom: 100%;
|
||||||
width: 1.5px;
|
width: 1.5px;
|
||||||
height: 29.76cqw;
|
height: 300px;
|
||||||
background-color: var(--navy);
|
background-color: var(--navy);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@ -442,7 +441,7 @@ body {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: var(--text-dark);
|
color: var(--text-dark);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
max-width: clamp(120px, 18.35cqw, 185px);
|
max-width: 185px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -625,50 +624,26 @@ body {
|
|||||||
.side-panel {
|
.side-panel {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: 32px 24px;
|
padding: 40px 32px;
|
||||||
flex-direction: column;
|
flex-direction: row;
|
||||||
align-items: flex-start;
|
flex-wrap: wrap;
|
||||||
gap: 0;
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-area {
|
.main-area {
|
||||||
flex: 0 0 auto;
|
min-height: 420px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
|
||||||
/* Keep the same width:height ratio as the desktop design so the
|
|
||||||
road path, car and step-label overlays stay aligned at any width. */
|
|
||||||
aspect-ratio: 1008 / 769;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--fs-number: 18vw;
|
--fs-number: 20vw;
|
||||||
--fs-number-lg: 20vw;
|
--fs-number-lg: 22vw;
|
||||||
--fs-unit: 7vw;
|
--fs-unit: 8vw;
|
||||||
--fs-intro: 4.5vw;
|
--fs-intro: 5vw;
|
||||||
--fs-desc: 3.2vw;
|
--fs-desc: 3.5vw;
|
||||||
--fs-step-title: 2.8vw;
|
--fs-step-title: 3vw;
|
||||||
--fs-step-desc: 2vw;
|
--fs-step-desc: 2.2vw;
|
||||||
--panel-w: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.side-panel {
|
|
||||||
padding: 24px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.side-panel__desc {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--fs-number: 22vw;
|
|
||||||
--fs-number-lg: 24vw;
|
|
||||||
--fs-unit: 9vw;
|
|
||||||
--fs-intro: 5.5vw;
|
|
||||||
--fs-desc: 4vw;
|
|
||||||
--fs-step-title: 3.4vw;
|
|
||||||
--fs-step-desc: 2.6vw;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user