chore(clean): dedup card CSS via grouped selectors (CLN-3)
Shared chrome/hover/head/title/tag blocks for stack/project/theme cards + methode items; per-class blocks keep only specifics. Zero HTML change, cascade-order verified (no interfering rules between shared and specific blocks). Net -60 lines; the audit's ~421 estimate was overstated.
This commit is contained in:
+19
-64
@@ -419,39 +419,49 @@
|
|||||||
gap: 20px;
|
gap: 20px;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
.stack-card {
|
/* ── Shared card chrome (stack / project / theme cards + méthode items).
|
||||||
|
Per-class blocks below keep only their specifics; the cascade resolves
|
||||||
|
identically to the previous duplicated declarations. ── */
|
||||||
|
.stack-card, .project-card, .theme-card, .methode-item {
|
||||||
background: var(--page);
|
background: var(--page);
|
||||||
border: 1px solid var(--rule);
|
border: 1px solid var(--rule);
|
||||||
border-radius: var(--r-md);
|
border-radius: var(--r-md);
|
||||||
padding: 24px;
|
|
||||||
transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
|
transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
|
||||||
}
|
}
|
||||||
.stack-card:hover {
|
.stack-card:hover, .project-card:hover, .theme-card:hover, .methode-item:hover {
|
||||||
border-color: var(--g300);
|
border-color: var(--g300);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: var(--shadow-md);
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
.stack-card-head {
|
.stack-card-head, .project-card-head, .theme-card-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 16px;
|
|
||||||
padding-bottom: 12px;
|
|
||||||
border-bottom: 1px dashed var(--rule);
|
border-bottom: 1px dashed var(--rule);
|
||||||
}
|
}
|
||||||
.stack-card h3 {
|
.stack-card h3, .project-card h3, .theme-card h4, .methode-body h3 {
|
||||||
font-family: var(--serif);
|
font-family: var(--serif);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 19px;
|
|
||||||
color: var(--ink-1);
|
color: var(--ink-1);
|
||||||
letter-spacing: -0.01em;
|
letter-spacing: -0.01em;
|
||||||
}
|
}
|
||||||
.stack-card-tag {
|
.stack-card-tag, .project-card-tag, .theme-card-tag {
|
||||||
font-family: var(--mono);
|
font-family: var(--mono);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: var(--g500);
|
color: var(--g500);
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stack-card {
|
||||||
|
padding: 24px;
|
||||||
|
}
|
||||||
|
.stack-card-head {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
}
|
||||||
|
.stack-card h3 {
|
||||||
|
font-size: 19px;
|
||||||
|
}
|
||||||
.pills {
|
.pills {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -641,40 +651,19 @@
|
|||||||
}
|
}
|
||||||
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
|
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
|
||||||
.project-card {
|
.project-card {
|
||||||
background: var(--page);
|
|
||||||
border: 1px solid var(--rule);
|
|
||||||
border-radius: var(--r-md);
|
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.project-card:hover {
|
|
||||||
border-color: var(--g300);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: var(--shadow-md);
|
|
||||||
}
|
|
||||||
.project-card-head {
|
.project-card-head {
|
||||||
display: flex;
|
|
||||||
align-items: baseline;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
border-bottom: 1px dashed var(--rule);
|
|
||||||
}
|
}
|
||||||
.project-card h3 {
|
.project-card h3 {
|
||||||
font-family: var(--serif);
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: var(--ink-1);
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
}
|
}
|
||||||
.project-card-tag {
|
.project-card-tag {
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--g500);
|
|
||||||
letter-spacing: 0.1em;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -732,41 +721,20 @@
|
|||||||
@media (min-width: 1200px) { .formation-themes { grid-template-columns: repeat(3, 1fr); } }
|
@media (min-width: 1200px) { .formation-themes { grid-template-columns: repeat(3, 1fr); } }
|
||||||
|
|
||||||
.theme-card {
|
.theme-card {
|
||||||
background: var(--page);
|
|
||||||
border: 1px solid var(--rule);
|
|
||||||
border-radius: var(--r-md);
|
|
||||||
padding: 22px;
|
padding: 22px;
|
||||||
transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.theme-card:hover {
|
|
||||||
border-color: var(--g300);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: var(--shadow-md);
|
|
||||||
}
|
|
||||||
.theme-card-head {
|
.theme-card-head {
|
||||||
display: flex;
|
|
||||||
align-items: baseline;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
border-bottom: 1px dashed var(--rule);
|
|
||||||
}
|
}
|
||||||
.theme-card h4 {
|
.theme-card h4 {
|
||||||
font-family: var(--serif);
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: var(--ink-1);
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
.theme-card-tag {
|
.theme-card-tag {
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--g500);
|
|
||||||
letter-spacing: 0.1em;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.theme-quote {
|
.theme-quote {
|
||||||
@@ -861,16 +829,7 @@
|
|||||||
grid-template-columns: 56px 1fr;
|
grid-template-columns: 56px 1fr;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
background: var(--page);
|
|
||||||
border: 1px solid var(--rule);
|
|
||||||
border-radius: var(--r-md);
|
|
||||||
padding: 22px 24px;
|
padding: 22px 24px;
|
||||||
transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
|
|
||||||
}
|
|
||||||
.methode-item:hover {
|
|
||||||
border-color: var(--g300);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: var(--shadow-md);
|
|
||||||
}
|
}
|
||||||
.methode-num {
|
.methode-num {
|
||||||
font-family: var(--mono);
|
font-family: var(--mono);
|
||||||
@@ -882,11 +841,7 @@
|
|||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
}
|
}
|
||||||
.methode-body h3 {
|
.methode-body h3 {
|
||||||
font-family: var(--serif);
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 19px;
|
font-size: 19px;
|
||||||
color: var(--ink-1);
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user