Skip to content

Commit 3916334

Browse files
authored
Merge pull request #832 from strictdoc-project/mettta/newUI
UI: refactor CSS
2 parents 629e35c + fedeb04 commit 3916334

37 files changed

+235
-306
lines changed

strictdoc/export/html/_static/_content.css

+11-55
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,44 @@
1-
.content {
2-
display: grid;
3-
grid-template-columns: 1fr 1fr 1fr;
4-
gap: 0 0;
5-
place-items: stretch stretch;
6-
/*
7-
for vertical line in 'current' column:
8-
.content_item[data-role="current"]::before
9-
*/
10-
overflow: hidden;
11-
}
12-
131
[data-viewtype="document"] .content {
142
display: block;
15-
background-color: var(--color-bg-contrast);
163
max-width: 900px;
17-
padding: calc(var(--base-padding)*2);
184
}
195

206
[data-viewtype="traceability"] .content {
7+
display: grid;
8+
place-items: stretch stretch;
219
grid-template-columns: minmax(min-content, max-content)
2210
minmax(var(--card-width), calc(2*var(--card-width)))
2311
minmax(min-content, max-content);
2412
gap: var(--traceability-arrow) 0;
2513
width: -moz-fit-content;
2614
width: fit-content;
15+
overflow: hidden;
2716
}
2817

2918
[data-viewtype="requirements-coverage"] .content,
3019
[data-viewtype="deep_traceability"] .content {
20+
display: grid;
21+
place-items: stretch stretch;
3122
grid-template-columns: minmax(min-content, max-content)
3223
max-content
3324
minmax(min-content, max-content);
3425
gap: var(--traceability-arrow) 0;
3526
width: -moz-fit-content;
3627
width: fit-content;
28+
overflow: hidden;
3729
}
3830

3931
[data-viewtype="table"] .content {
40-
/* grid-template-columns: minmax(250px, 25%)
41-
minmax(300px, 45%)
42-
minmax(250px, 30%);
43-
gap: 2px;
44-
background-color: #ddd;
45-
border: 2px solid #ddd; */
4632
background-color: var(--color-bg-contrast);
4733
display: block;
48-
overflow: visible;
4934
}
5035

36+
/* TODO */
37+
/* used in TR, DTR, requirements_coverage: */
5138
.content_section {
5239
display: contents;
5340
}
54-
41+
/* TODO */
5542
.content_item {
5643
position: relative;
5744
display: flex;
@@ -96,37 +83,6 @@
9683
border-left: 1px dotted #000;
9784
}
9885

99-
/* [data-viewtype="table"] */
100-
101-
[data-viewtype="table"] article {
102-
display: contents;
103-
}
104-
105-
[data-viewtype="table"] [data-section="meta"] {
106-
grid-column: 1 / 2;
107-
}
108-
109-
[data-viewtype="table"] [data-section="meta"].docsection_section:only-child {
110-
grid-column: 1 / -1;
111-
/* background-color: var(--color-bg-main); */
112-
}
113-
114-
[data-viewtype="table"] [data-section="description"] {
115-
grid-column: 2 / -1;
116-
}
117-
118-
[data-viewtype="table"] [data-section="statement"] {
119-
grid-column: 2 / 3;
120-
}
121-
122-
[data-viewtype="table"] [data-section="comment"] {
123-
grid-column: 3 / 4;
124-
}
125-
126-
[data-viewtype="table"] [data-col="0"] {
127-
grid-column: 1 / -1;
128-
}
129-
13086
/* meta info */
13187

13288
.content_meta {
@@ -250,11 +206,11 @@
250206
}
251207

252208
.content-view-td-related,
253-
.content-view-td-related > ul.requirement_link {
209+
.content-view-td-related > ul.requirement__link {
254210
font-size: .85rem;
255211
margin-top: 0;
256212
}
257213

258-
.content-view-td-related > ul.requirement_link:last-child {
214+
.content-view-td-related > ul.requirement__link:last-child {
259215
margin-bottom: 0;
260216
}

strictdoc/export/html/_static/_element.css

+28-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
[data-viewtype="source-file"] .requirement_link:hover {
3+
[data-viewtype="source-file"] .requirement__link:hover {
44
text-decoration: none;
55
}
66

@@ -34,9 +34,10 @@ a[aria-disabled="true"] {
3434
pointer-events: none;
3535
}
3636

37-
main a,
38-
main a:link,
39-
main a:visited {
37+
/* .document from tool */
38+
.document a,
39+
.document a:link,
40+
.document a:visited {
4041
text-decoration: underline;
4142
}
4243

@@ -80,15 +81,18 @@ main a:visited {
8081
column-gap: var(--base-rhythm);
8182
}
8283

84+
.action_button,
8385
a.action_button,
84-
.action_button {
86+
a.action_button:link,
87+
a.action_button:visited {
8588
font-size:var(--font-size-xsm);
8689
font-weight: 600;
8790
text-align: left;
8891
text-decoration: none;
8992
white-space: nowrap;
9093
position: relative;
9194
display: inline-flex;
95+
9296
align-items: center;
9397
justify-content: center;
9498
-webkit-box-align: center;
@@ -99,19 +103,24 @@ a.action_button,
99103
user-select: none;
100104
cursor: pointer;
101105
appearance: none;
102-
padding: calc(var(--base-rhythm)*0.5) calc(var(--base-rhythm)*1.5);
103-
min-height: 32px;
104106

105-
box-shadow: rgb(0 0 0 / 10%) 0px 1px 2px 0px;
107+
/* 1.5 column-gap is compensated by SVG negative margin */
108+
column-gap: calc(var(--base-rhythm)*1.5);
109+
padding-left: calc(var(--base-rhythm)*1.5);
110+
padding-right: calc(var(--base-rhythm)*1.5);
111+
min-height: calc(var(--base-rhythm)*4);
112+
113+
/* box-shadow: rgb(0 0 0 / 10%) 0px 1px 2px 0px; */
106114
color: var(--color-action);
107115
background-color: rgb(255, 255, 255);
108-
border-color: rgba(0, 0, 0, 0.1);
116+
border-color: rgba(0, 0, 0, 0.05);
109117
background-clip: padding-box;
110118

111119
transition: 0.2s;
112120
}
113121

114-
.action_button:hover {
122+
.action_button:hover,
123+
a.action_button:hover {
115124
box-shadow: rgb(0 0 0 / 10%) 0px 2px var(--base-rhythm) 0px;
116125
color: var(--color-hover);
117126
}
@@ -125,6 +134,15 @@ a.action_button,
125134
cursor: default;
126135
}
127136

137+
.action_button svg {
138+
/*
139+
action_button 1.5 column-gap
140+
is compensated by SVG negative margin
141+
*/
142+
margin-left: calc(var(--base-rhythm)*(-.5));
143+
margin-right: calc(var(--base-rhythm)*(-.5));
144+
}
145+
128146
/* nav */
129147

130148
.nav {

0 commit comments

Comments
 (0)