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;
|
||||
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);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: var(--r-md);
|
||||
padding: 24px;
|
||||
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);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.stack-card-head {
|
||||
.stack-card-head, .project-card-head, .theme-card-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 12px;
|
||||
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-weight: 600;
|
||||
font-size: 19px;
|
||||
color: var(--ink-1);
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.stack-card-tag {
|
||||
.stack-card-tag, .project-card-tag, .theme-card-tag {
|
||||
font-family: var(--mono);
|
||||
font-size: 11px;
|
||||
color: var(--g500);
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.stack-card {
|
||||
padding: 24px;
|
||||
}
|
||||
.stack-card-head {
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
.stack-card h3 {
|
||||
font-size: 19px;
|
||||
}
|
||||
.pills {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -641,40 +651,19 @@
|
||||
}
|
||||
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
|
||||
.project-card {
|
||||
background: var(--page);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: var(--r-md);
|
||||
padding: 24px;
|
||||
transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.project-card:hover {
|
||||
border-color: var(--g300);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.project-card-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px dashed var(--rule);
|
||||
}
|
||||
.project-card h3 {
|
||||
font-family: var(--serif);
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
color: var(--ink-1);
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.project-card-tag {
|
||||
font-family: var(--mono);
|
||||
font-size: 11px;
|
||||
color: var(--g500);
|
||||
letter-spacing: 0.1em;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -732,41 +721,20 @@
|
||||
@media (min-width: 1200px) { .formation-themes { grid-template-columns: repeat(3, 1fr); } }
|
||||
|
||||
.theme-card {
|
||||
background: var(--page);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: var(--r-md);
|
||||
padding: 22px;
|
||||
transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.theme-card:hover {
|
||||
border-color: var(--g300);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.theme-card-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px dashed var(--rule);
|
||||
}
|
||||
.theme-card h4 {
|
||||
font-family: var(--serif);
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
color: var(--ink-1);
|
||||
letter-spacing: -0.01em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.theme-card-tag {
|
||||
font-family: var(--mono);
|
||||
font-size: 11px;
|
||||
color: var(--g500);
|
||||
letter-spacing: 0.1em;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.theme-quote {
|
||||
@@ -861,16 +829,7 @@
|
||||
grid-template-columns: 56px 1fr;
|
||||
gap: 20px;
|
||||
align-items: start;
|
||||
background: var(--page);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: var(--r-md);
|
||||
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 {
|
||||
font-family: var(--mono);
|
||||
@@ -882,11 +841,7 @@
|
||||
padding-top: 4px;
|
||||
}
|
||||
.methode-body h3 {
|
||||
font-family: var(--serif);
|
||||
font-weight: 600;
|
||||
font-size: 19px;
|
||||
color: var(--ink-1);
|
||||
letter-spacing: -0.01em;
|
||||
margin-bottom: 6px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user