Skip to content

Commit cf2c413

Browse files
committed
feat: simplify css
1 parent 4abd8d4 commit cf2c413

File tree

7 files changed

+38
-154
lines changed

7 files changed

+38
-154
lines changed

assets/css/01_reset.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ h6 {
2828

2929
h1 {
3030
font-size: var(--fsize-xl);
31+
color: var(--accent);
32+
border-bottom: 2px solid var(--accent);
33+
width: 100%;
3134
}
3235

3336
h2 {
@@ -52,6 +55,7 @@ h6 {
5255

5356
p {
5457
text-wrap: pretty;
58+
margin: 0 0 var(--vertical-0);
5559
}
5660

5761
ul,

assets/css/02_main.css

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,6 @@ body {
88
height: 100dvh;
99
}
1010

11-
h2 {
12-
color: var(--warm);
13-
}
14-
h3 {
15-
color: var(--cold);
16-
}
17-
h4 {
18-
color: var(--mild);
19-
}
20-
h5 {
21-
color: var(--calm);
22-
}
23-
h6 {
24-
color: var(--fg-1);
25-
}
26-
2711
p {
2812
margin: 0 0 var(--vertical-0);
2913
}
@@ -45,48 +29,6 @@ button:hover {
4529
background: var(--bg-0);
4630
}
4731

48-
h1,
49-
h2,
50-
h3,
51-
h4,
52-
h5,
53-
h6 {
54-
text-wrap: balance;
55-
margin-bottom: 1rem;
56-
font-weight: 700;
57-
}
58-
59-
h1 {
60-
color: var(--accent);
61-
border-bottom: 2px solid var(--accent);
62-
width: 100%;
63-
}
64-
65-
h2 {
66-
color: var(--warm);
67-
}
68-
69-
h3 {
70-
color: var(--cold);
71-
}
72-
73-
h4 {
74-
color: var(--mild);
75-
}
76-
77-
h5 {
78-
color: var(--calm);
79-
}
80-
81-
h6 {
82-
color: var(--fg-1);
83-
}
84-
85-
p {
86-
text-wrap: pretty;
87-
margin: 0 0 var(--vertical-0);
88-
}
89-
9032
abbr {
9133
cursor: help;
9234
}

assets/css/03_layout.css

Lines changed: 30 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,53 @@ body {
33

44
display: grid;
55

6-
grid-template-areas: "nav content";
7-
grid-template-rows: 1fr;
8-
grid-template-columns: auto 1fr;
6+
grid-template-areas:
7+
"nav"
8+
"content";
9+
grid-template-rows: auto 1fr;
10+
grid-template-columns: 1fr;
911
}
1012

1113
#content {
1214
grid-area: content;
1315
display: grid;
1416

1517
height: 100dvh;
16-
overflow: auto;
18+
margin: 0 auto;
1719
}
1820

1921
nav {
2022
grid-area: nav;
2123
display: flex;
22-
flex-direction: row-reverse;
23-
align-content: right;
24-
align-items: flex-start;
25-
}
26-
27-
nav fieldset {
28-
display: flex;
29-
gap: 2px;
30-
flex-direction: column;
24+
gap: 8px;
25+
flex-direction: row;
26+
align-content: center; /* vertical align */
27+
align-items: center;
3128
justify-content: center;
32-
align-items: left;
33-
padding: 0.5rem 0.8rem 0.8rem 0.8rem;
34-
margin: 1rem 1.8rem 1rem 1.8rem;
35-
background-color: var(--bg-0);
36-
border: 2px solid var(--accent);
37-
border-radius: 0px;
38-
box-shadow: none;
29+
justify-items: center;
30+
padding: 0.5rem 0.5rem 0.5rem 1rem;
31+
background-color: var(--bg-1);
32+
border-bottom: 1px solid var(--border);
3933
}
4034

41-
nav fieldset legend {
42-
font-family: var(--font-text2);
43-
font-size: var(--fsize-xs);
44-
font-style: italic;
45-
color: var(--fg-1);
46-
padding: 0 0.3rem 0 0.3rem;
35+
nav div {
36+
width: var(--view-width);
37+
max-width: var(--view-width);
38+
margin: 0 auto;
39+
padding-left: 0.8rem;
4740
}
4841

49-
nav fieldset label {
42+
nav label {
5043
color: var(--fg-0);
5144
font-size: var(--fsize-s);
5245
font-family: var(--font-text2);
46+
font-weight: 500;
5347
cursor: pointer;
5448
padding: 2px;
5549
}
5650

57-
nav fieldset label:hover {
58-
color: var(--accent-hover) !important;
51+
nav label:hover {
52+
color: var(--accent-hover);
5953
text-decoration: underline;
6054
}
6155

@@ -77,14 +71,14 @@ input[type="radio"].nav {
7771
padding: 1rem;
7872
}
7973

80-
#radio-parse:checked ~ nav fieldset label[for="radio-parse"],
81-
#radio-overview:checked ~ nav fieldset label[for="radio-overview"],
82-
#radio-timings:checked ~ nav fieldset label[for="radio-timings"],
83-
#radio-headers:checked ~ nav fieldset label[for="radio-headers"],
84-
#radio-vcllogtree:checked ~ nav fieldset label[for="radio-vcllogtree"],
85-
#radio-reqbuild:checked ~ nav fieldset label[for="radio-reqbuild"] {
74+
#radio-parse:checked ~ nav label[for="radio-parse"],
75+
#radio-overview:checked ~ nav label[for="radio-overview"],
76+
#radio-timings:checked ~ nav label[for="radio-timings"],
77+
#radio-headers:checked ~ nav label[for="radio-headers"],
78+
#radio-vcllogtree:checked ~ nav label[for="radio-vcllogtree"],
79+
#radio-reqbuild:checked ~ nav label[for="radio-reqbuild"] {
8680
color: var(--accent);
87-
font-weight: bold;
81+
text-decoration: underline;
8882
}
8983

9084
#radio-parse:checked ~ #content #parse-view,
@@ -95,38 +89,3 @@ input[type="radio"].nav {
9589
#radio-reqbuild:checked ~ #content #reqbuild-view {
9690
display: block;
9791
}
98-
99-
@media (max-width: 980px) {
100-
body {
101-
grid-template-areas:
102-
"nav"
103-
"content";
104-
grid-template-rows: auto 1fr;
105-
grid-template-columns: 1fr;
106-
}
107-
108-
#content {
109-
overflow: visible;
110-
}
111-
112-
nav {
113-
flex-direction: row;
114-
align-content: center;
115-
align-items: center;
116-
padding: 0 0 2px 0;
117-
}
118-
119-
nav fieldset {
120-
flex-direction: row;
121-
flex-wrap: wrap;
122-
gap: 6px;
123-
align-items: center;
124-
margin: 0 0.4rem 0 0.4rem;
125-
padding: 0.3rem 0.4rem 0.4rem 0.4rem;
126-
}
127-
128-
.view-content {
129-
max-width: 100vw;
130-
padding: 0.6rem;
131-
}
132-
}

assets/css/05_headers.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,3 @@ div.hdr-table {
109109
background: var(--deleted) !important;
110110
text-decoration: line-through !important;
111111
}
112-
113-
@media (max-width: 980px) {
114-
div.hdr-table {
115-
& abbr input {
116-
padding: 2px;
117-
}
118-
}
119-
}

assets/css/08_timeline.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
div.timeline {
22
display: inline-block;
3-
width: 83vw;
3+
width: var(--view-width);
44
max-width: var(--view-width);
55
}
66

7-
@media (max-width: 980px) {
8-
div.timeline {
9-
width: 98vw;
10-
}
11-
}
12-
137
/* Default classes from svg-timeline */
148
.tl-bg {
159
fill: #ffffff;

assets/css/09_sequence.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
div.sequence {
22
display: inline-block;
3-
width: 83vw;
3+
width: var(--view-width);
44
max-width: var(--view-width);
55
}
6-
7-
@media (max-width: 980px) {
8-
div.sequence {
9-
width: 98vw;
10-
}
11-
}

assets/templates/layout/main_layout.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
<input type="radio" class="nav" name="view" id="radio-timings">
2525
<input type="radio" class="nav" name="view" id="radio-reqbuild">
2626
<nav>
27-
<fieldset>
28-
<legend>Menu</legend>
27+
<div>
2928
<label for="radio-parse">PARSE</label>
3029
<label for="radio-overview">Overview</label>
3130
<label for="radio-vcllogtree">LogTree</label>
3231
<label for="radio-headers">Headers</label>
3332
<label for="radio-timings">Timings</label>
3433
<label for="radio-reqbuild">ReqBuild</label>
35-
</fieldset>
34+
</div>
3635
</nav>
3736

3837
<div id="content">

0 commit comments

Comments
 (0)