Skip to content

Commit 0e91662

Browse files
authored
feat: results accordion - add basic markup and styles (#12)
Add basic markup structure for results page accordion areas, within details / summary elements.
1 parent 77c71bb commit 0e91662

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

src/panels/results/results.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ <h1 class="cv-header__title">Carbon Visualizer</h1>
1616
🌱
1717
</div>
1818
<h2 class="cv-results__title">Results</h2>
19-
<p class="cv-results__description">
20-
This is where you'd see the results of the analysis. Coming soon!
21-
</p>
22-
19+
<div class="cv-results__sections">
20+
<h3>Page Weight</h3>
21+
<details class="cv-results__details">
22+
<summary class="heading-sm">Remove Unused Code</summary>
23+
<div class="cv-results__group">
24+
<h4 class="heading-xs">Unused CSS</h4>
25+
<p>&mdash;</p>
26+
</div>
27+
</details>
28+
</div>
2329
<button class="cv-btn cv-btn--primary" id="back-to-welcome-btn">
2430
Analyze another page
2531
</button>

src/styles/results.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,27 @@
2424
color: var(--cv-white);
2525
line-height: 1.5;
2626
}
27+
28+
.cv-results__sections {
29+
text-align: start;
30+
margin-bottom: 2.0rem;
31+
}
32+
33+
.cv-results__group {
34+
padding: 1.0rem;
35+
border: 1px solid currentColor;
36+
border-inline-start-width: 4px;
37+
border-radius: 1.0rem;
38+
}
39+
40+
.cv-results__group > *:first-child {
41+
margin-block-start: 0;
42+
}
43+
44+
.cv-results__group > *:last-child {
45+
margin-block-end: 0;
46+
}
47+
48+
.cv-results__details summary {
49+
margin-block-end: 0.5rem;
50+
}

0 commit comments

Comments
 (0)