style: convert project sizing to scalable rem units with responsive root font scaling
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
.projectsSection {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 60px;
|
||||
padding-bottom: 80px;
|
||||
padding-top: 3.75rem;
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
|
||||
.headerRow {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 44px;
|
||||
margin-bottom: 2.75rem;
|
||||
}
|
||||
|
||||
.arrowButtons {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
gap: 0.75rem;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
@@ -100,17 +100,17 @@
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
width: max-content;
|
||||
gap: 20px;
|
||||
padding: 4px 0 8px;
|
||||
gap: 1.25rem;
|
||||
padding: 0.25rem 0 0.5rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
flex: 0 0 clamp(300px, 24vw, 340px);
|
||||
flex: 0 0 clamp(18.75rem, 24vw, 21.25rem);
|
||||
flex-shrink: 0;
|
||||
flex-direction: column;
|
||||
width: clamp(300px, 24vw, 340px);
|
||||
min-height: 460px;
|
||||
width: clamp(18.75rem, 24vw, 21.25rem);
|
||||
min-height: 28.75rem;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid var(--border-default);
|
||||
@@ -139,19 +139,19 @@
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
padding: 18px 16px;
|
||||
padding: 1.125rem 1rem;
|
||||
}
|
||||
|
||||
.cardTitleRow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
margin-bottom: 6px;
|
||||
gap: 0.4375rem;
|
||||
margin-bottom: 0.375rem;
|
||||
}
|
||||
|
||||
.cardTitle {
|
||||
color: var(--text-primary);
|
||||
font-size: 18px;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
}
|
||||
@@ -166,9 +166,9 @@
|
||||
}
|
||||
|
||||
.cardDate {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 0.625rem;
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 700;
|
||||
line-height: var(--line-height-label-small);
|
||||
letter-spacing: var(--letter-spacing-eyebrow);
|
||||
@@ -177,10 +177,10 @@
|
||||
|
||||
.cardDesc {
|
||||
display: -webkit-box;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 1rem;
|
||||
overflow: hidden;
|
||||
color: var(--text-primary);
|
||||
font-size: 13.5px;
|
||||
font-size: 0.84375rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.55;
|
||||
-webkit-box-orient: vertical;
|
||||
@@ -193,12 +193,12 @@
|
||||
.tagList {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-bottom: 18px;
|
||||
gap: 0.375rem;
|
||||
margin-bottom: 1.125rem;
|
||||
}
|
||||
|
||||
.tagBadge {
|
||||
padding: 5px 12px;
|
||||
padding: 0.3125rem 0.75rem;
|
||||
border: 0;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--color-blue-200);
|
||||
@@ -220,7 +220,7 @@
|
||||
.caseStudyLink {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
gap: 0.625rem;
|
||||
color: var(--color-blue-500);
|
||||
font-size: var(--font-size-body-small);
|
||||
font-weight: 600;
|
||||
@@ -240,14 +240,14 @@
|
||||
.scrollbarWrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 40px;
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
.scrollbar {
|
||||
--thumb-width: 216px;
|
||||
width: 480px;
|
||||
--thumb-width: 13.5rem;
|
||||
width: 30rem;
|
||||
max-width: 100%;
|
||||
height: 20px;
|
||||
height: 1.25rem;
|
||||
margin: 0;
|
||||
appearance: none;
|
||||
background: transparent;
|
||||
@@ -255,14 +255,14 @@
|
||||
}
|
||||
|
||||
.scrollbar::-webkit-slider-runnable-track {
|
||||
height: 6px;
|
||||
height: 0.375rem;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--color-blue-200);
|
||||
}
|
||||
|
||||
.scrollbar::-webkit-slider-thumb {
|
||||
width: var(--thumb-width, 216px);
|
||||
height: 6px;
|
||||
width: var(--thumb-width, 13.5rem);
|
||||
height: 0.375rem;
|
||||
margin-top: 0;
|
||||
appearance: none;
|
||||
border: 0;
|
||||
@@ -271,15 +271,15 @@
|
||||
}
|
||||
|
||||
.scrollbar::-moz-range-track {
|
||||
height: 6px;
|
||||
height: 0.375rem;
|
||||
border: 0;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--color-blue-200);
|
||||
}
|
||||
|
||||
.scrollbar::-moz-range-thumb {
|
||||
width: var(--thumb-width, 216px);
|
||||
height: 6px;
|
||||
width: var(--thumb-width, 13.5rem);
|
||||
height: 0.375rem;
|
||||
border: 0;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--color-blue-400);
|
||||
@@ -313,17 +313,17 @@
|
||||
================================================================ */
|
||||
@media (max-width: 1440px) and (min-width: 1101px) {
|
||||
.carouselTrack {
|
||||
gap: 20px;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
flex: 0 0 clamp(290px, 23vw, 330px);
|
||||
width: clamp(290px, 23vw, 330px);
|
||||
flex: 0 0 clamp(18.125rem, 23vw, 20.625rem);
|
||||
width: clamp(18.125rem, 23vw, 20.625rem);
|
||||
}
|
||||
|
||||
.scrollbar {
|
||||
width: min(480px, 50vw);
|
||||
--thumb-width: 120px;
|
||||
width: min(30rem, 50vw);
|
||||
--thumb-width: 7.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
.headerRow {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32px;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.carouselViewport {
|
||||
@@ -349,13 +349,13 @@
|
||||
}
|
||||
|
||||
.carouselTrack {
|
||||
gap: 20px;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
flex: 0 0 clamp(310px, 42vw, 350px);
|
||||
width: clamp(310px, 42vw, 350px);
|
||||
min-height: 450px;
|
||||
flex: 0 0 clamp(19.375rem, 42vw, 21.875rem);
|
||||
width: clamp(19.375rem, 42vw, 21.875rem);
|
||||
min-height: 28rem;
|
||||
box-sizing: border-box;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
@@ -365,17 +365,17 @@
|
||||
}
|
||||
|
||||
.cardBody {
|
||||
padding: 18px 16px;
|
||||
padding: 1.125rem 1rem;
|
||||
}
|
||||
|
||||
.cardTitle {
|
||||
font-size: 18px;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
.cardDesc {
|
||||
font-size: 13.5px;
|
||||
font-size: 0.84375rem;
|
||||
line-height: 1.55;
|
||||
margin-bottom: 14px;
|
||||
margin-bottom: 0.875rem;
|
||||
-webkit-line-clamp: 3;
|
||||
white-space: normal;
|
||||
word-break: normal;
|
||||
@@ -383,39 +383,39 @@
|
||||
}
|
||||
|
||||
.tagList {
|
||||
gap: 6px;
|
||||
margin-bottom: 16px;
|
||||
gap: 0.375rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.tagBadge {
|
||||
padding: 3px 9px;
|
||||
font-size: 11px;
|
||||
padding: 0.25rem 0.5625rem;
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
|
||||
.scrollbarWrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 32px;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.scrollbar {
|
||||
width: min(360px, 60vw);
|
||||
--thumb-width: 90px;
|
||||
width: min(22.5rem, 60vw);
|
||||
--thumb-width: 5.625rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ================================================================
|
||||
MOBILE ≤ 650px
|
||||
Comfortable ~310px-330px card (~1 card visible with clean margins)
|
||||
Clean 1-column layout: 1 card visible at a time with page gutter
|
||||
================================================================ */
|
||||
@media (max-width: 650px) {
|
||||
.projectsSection {
|
||||
padding-top: 48px;
|
||||
padding-bottom: 64px;
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 4rem;
|
||||
}
|
||||
|
||||
.headerRow {
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.arrowButtons {
|
||||
@@ -432,7 +432,7 @@
|
||||
}
|
||||
|
||||
.carouselTrack {
|
||||
gap: 16px;
|
||||
gap: 1rem;
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@
|
||||
min-width: calc(100vw - (2 * var(--layout-page-gutter)));
|
||||
min-width: 100cqw;
|
||||
max-width: 100%;
|
||||
min-height: 420px;
|
||||
min-height: 26.25rem;
|
||||
box-sizing: border-box;
|
||||
scroll-snap-align: start;
|
||||
scroll-snap-stop: always;
|
||||
@@ -455,17 +455,17 @@
|
||||
}
|
||||
|
||||
.cardBody {
|
||||
padding: 18px 16px;
|
||||
padding: 1.125rem 1rem;
|
||||
}
|
||||
|
||||
.cardTitle {
|
||||
font-size: 18px;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
.cardDesc {
|
||||
font-size: 13px;
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 14px;
|
||||
margin-bottom: 0.875rem;
|
||||
white-space: normal;
|
||||
word-break: normal;
|
||||
overflow-wrap: break-word;
|
||||
@@ -473,25 +473,25 @@
|
||||
}
|
||||
|
||||
.tagList {
|
||||
gap: 6px;
|
||||
margin-bottom: 16px;
|
||||
gap: 0.375rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.tagBadge {
|
||||
padding: 3px 9px;
|
||||
font-size: 11px;
|
||||
padding: 0.25rem 0.5625rem;
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
|
||||
.scrollbarWrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 24px;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.scrollbar {
|
||||
width: min(200px, 60vw);
|
||||
height: 16px;
|
||||
--thumb-width: 60px;
|
||||
width: min(12.5rem, 60vw);
|
||||
height: 1rem;
|
||||
--thumb-width: 3.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user