-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
207 lines (183 loc) · 4.92 KB
/
styles.css
File metadata and controls
207 lines (183 loc) · 4.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/* General Page Styling */
body {
font-family: Arial, sans-serif;
background-color: white;
margin: 0;
padding: 20px;
text-align: center;
overflow-x: hidden;
}
/* Table Wrapper */
.table-wrapper {
width: 100%;
overflow-x: auto; /* Enable horizontal scrolling if needed */
margin: 20px 0;
}
/* Table Styling */
table {
width: auto; /* Allow the table to shrink to fit contents */
max-width: 100%;
margin: 0 auto;
border-collapse: collapse;
table-layout: fixed; /* Enforce fixed-width layout for columns */
text-align: center;
}
thead th {
background-color: #333;
color: white;
padding: 4px; /* Standard padding for compact layout */
text-align: center; /* Center-align header text */
word-wrap: break-word; /* Allow word wrapping */
overflow-wrap: break-word;
white-space: normal; /* Allow text to wrap normally */
font-size: 0.85em; /* Slightly smaller font for headers */
line-height: 1.2; /* Tighter line spacing for wrapped headers */
}
/* Center Feature Description Header */
thead th:nth-child(2) {
text-align: center; /* Center-align header text */
}
/* Left-justify Feature Description Text */
tbody td:nth-child(2) {
text-align: left; /* Align cell content to the left */
padding-left: 8px; /* Add a slight left padding for readability */
}
tbody td, tfoot td {
padding: 4px; /* Standard padding */
border: 1px solid #ddd;
word-wrap: break-word; /* Allow word wrapping in cells */
overflow-wrap: break-word;
white-space: normal; /* Allow text to wrap normally */
font-size: 0.85em; /* Slightly smaller font for table cells */
}
/* Row 0 Background Color */
tbody tr:first-child td {
background-color: #f0f0f0; /* Light grey for row 0 */
}
/* Grey Columns (Except Footer Row) */
tbody td:nth-child(1), /* # column */
tbody td:nth-child(7), /* Accumulated Displacement */
tbody td:nth-child(8) /* Accumulated Symmetrical Tolerance */ {
background-color: #f0f0f0; /* Grey background for specified columns */
}
/* Entire Resulting Tolerance Stack Row */
tfoot tr td {
background-color: #d9fcd9; /* Bright green for the entire footer row */
color: black;
font-weight: bold;
}
/* Feature Description Column */
thead th:nth-child(2), tbody td:nth-child(2) {
width: 200px; /* Fixed width for Feature Description column */
padding: 16px; /* Extra padding for this column */
}
/* Direction Column */
thead th:nth-child(3), tbody td:nth-child(3) {
width: 70px; /* Fixed width for Direction column */
}
/* Displacement Column */
thead th:nth-child(4), tbody td:nth-child(4),
thead th:nth-child(5), tbody td:nth-child(5), /* Symmetrical Tolerance */
thead th:nth-child(7), tbody td:nth-child(7), /* Accumulated Displacement */
thead th:nth-child(8), tbody td:nth-child(8) /* Accumulated Symmetrical Tolerance */ {
width: 100px; /* Fixed width for numerical columns */
}
/* Actions Column */
thead th:last-child, tbody td:last-child {
width: 130px; /* Fixed width for Actions column */
text-align: center; /* Center-align the actions */
}
/* Editable Inputs */
input, select {
width: 100%; /* Inputs fill cell width */
color: grey; /* Default grey text */
font-weight: normal;
border: none;
background: transparent;
text-align: center;
white-space: normal; /* Allow wrapping for long text */
}
input.edited, select.edited {
color: black; /* Turn black on edit */
font-weight: bold;
}
/* Action Buttons */
button {
padding: 2px 4px; /* Standard padding */
margin: 0 2px; /* Space between icons */
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
background-color: white;
transition: background-color 0.3s;
display: inline-flex;
justify-content: center;
align-items: center;
font-size: 0.8em;
}
button:hover {
background-color: #f7f7f7;
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
svg {
width: 14px; /* Standard icon size */
height: 14px;
}
/* Buttons Below Table */
.controls-below {
display: flex;
justify-content: space-between;
margin-top: 10px;
width: 80%;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
#add-row {
align-self: flex-start; /* Position under the left side of the table */
margin-left: 0;
background-color: #007bff;
padding: 8px 16px;
font-size: 0.9em;
font-weight: bold;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
#reset-table {
align-self: flex-end; /* Position under the right side of the table */
margin-right: 0;
background-color: #dc3545; /* Red reset button */
padding: 8px 16px;
font-size: 0.9em;
font-weight: bold;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
#save-pdf {
background-color: #28a745;
margin: 0 auto;
padding: 8px 16px;
font-size: 0.9em;
font-weight: bold;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
/* Mobile Adjustments */
@media (max-width: 768px) {
.controls-below {
flex-direction: column;
gap: 10px;
}
table {
width: 100%;
}
}