Debian Codegraph @

frontend/css/journal-table.css

raw
1 /* stylelint-disable no-descending-specificity */
2
3 .flex-table p,
4 .flex-table li,
5 .flex-table ul,
6 .flex-table ol {
7 padding: 0;
8 margin: 0;
9 }
10
11 .flex-table p {
12 display: flex;
13 }
14
15 .flex-table p > span {
16 flex-shrink: 0;
17 padding: 2px 4px;
18 }
19
20 .flex-table .num {
21 font-family: var(--font-family-monospaced);
22 text-align: right;
23 }
24
25 .flex-table .head p > span {
26 padding: 3px 4px;
27 color: var(--table-header-text);
28 background-color: var(--table-header-background);
29 }
30
31 .flex-table .head .num {
32 font-family: var(--font-family);
33 }
34
35 .journal {
36 margin-top: 0.25rem;
37 }
38
39 .journal p,
40 .journal dl {
41 border-bottom: thin solid var(--table-border);
42 }
43
44 .journal .payee {
45 cursor: pointer;
46 }
47
48 .journal .postings {
49 font-size: 0.9em;
50 background-color: var(--journal-postings);
51 opacity: 0.8;
52 }
53
54 .journal .postings .num {
55 overflow: auto;
56 line-height: 16px;
57 }
58
59 .journal > li,
60 .journal.show-custom .custom.budget,
61 .journal.show-document .document.discovered,
62 .journal.show-document .document.linked,
63 .journal .metadata,
64 .journal .postings {
65 display: none;
66 }
67
68 .journal .head,
69 .journal.show-balance .balance,
70 .journal.show-close .close,
71 .journal.show-custom .custom,
72 .journal.show-document .document,
73 .journal.show-note .note,
74 .journal.show-open .open,
75 .journal.show-pad .pad,
76 .journal.show-query .query,
77 /* Show metadata and postings if it was toggled for the whole journal. */
78 .journal.show-metadata .metadata,
79 .journal.show-postings .postings,
80 /* Show metadata and postings where it was explicitly toggled with the indicators. */
81 .journal > li.show-full-entry .postings,
82 .journal > li.show-full-entry .metadata {
83 display: block;
84 }
85
86 .journal.show-transaction.show-cleared .transaction.cleared,
87 .journal.show-transaction.show-pending .transaction.pending,
88 .journal.show-transaction.show-other .transaction.other,
89 .journal.show-document.show-discovered .document.discovered,
90 .journal.show-document.show-linked .document.linked,
91 .journal.show-custom.show-budget .custom.budget {
92 display: block;
93 }
94
95 .journal .transaction:hover {
96 background: var(--journal-hover-highlight);
97 }
98
99 /* Metadata */
100 .journal .metadata {
101 padding: 2px 0;
102 margin: 0;
103 font-size: 0.9em;
104 }
105
106 .journal .metadata dt {
107 float: left;
108 width: auto;
109 min-width: 4rem;
110 margin-right: 6px;
111 margin-left: 9rem;
112 color: var(--journal-metadata);
113 cursor: pointer;
114 }
115
116 .journal .metadata dd {
117 margin-left: 15rem;
118 cursor: pointer;
119 }
120
121 /* There's three number columns (units, cost, price).
122 * They should add about to about half of the width */
123 .journal p > .num {
124 width: min(calc(15%), 20rem);
125 border-left: 1px solid var(--table-border);
126 }
127
128 .journal .datecell,
129 .journal .flag {
130 text-align: center;
131 background-color: var(--entry-background);
132 }
133
134 .journal .datecell {
135 width: 6rem;
136 white-space: nowrap;
137 }
138
139 .journal .flag {
140 width: 3rem;
141 }
142
143 .journal .change {
144 font-weight: 500;
145 }
146
147 .journal .description {
148 flex: 1;
149 padding-left: 8px;
150 overflow: hidden;
151 text-overflow: ellipsis;
152 white-space: nowrap;
153 }
154
155 .journal .show-postings .description {
156 white-space: normal;
157 }
158
159 .journal .description .separator::before {
160 padding: 2px;
161 margin: 0 6px;
162 font-weight: bold;
163 color: var(--text-color-lighter);
164 content: "•";
165 }
166
167 .journal .description .num {
168 margin: 0 5px;
169 }
170
171 .journal .tag,
172 .journal .link {
173 margin-left: 8px;
174 font-size: 0.9em;
175 cursor: pointer;
176 }
177
178 .journal .tag {
179 color: var(--journal-tag);
180 }
181
182 .journal .link {
183 color: var(--journal-link);
184 }
185
186 .journal .bal {
187 background-color: var(--entry-background);
188 }
189
190 .journal a:hover {
191 filter: brightness(80%);
192 }
193
194 .journal .filename,
195 .journal .url {
196 font-family: var(--font-family-monospaced);
197 font-size: 0.9em;
198 }
199
200 .journal .document .filename {
201 margin-left: 1em;
202 }
203
204 .journal .indicators {
205 display: flex;
206 flex-shrink: 3;
207 flex-wrap: wrap;
208 align-items: center;
209 justify-content: flex-end;
210 cursor: pointer;
211 }
212
213 .journal .indicators span {
214 min-width: 6px;
215 height: 6px;
216 padding: 0;
217 margin-right: 4px;
218 background-color: var(--journal-posting-indicator);
219 border-radius: 3px;
220 }
221
222 .journal .indicators .pending,
223 .journal .indicators .other {
224 background-color: var(--entry-background);
225 }
226
227 .journal .indicators .metadata-indicator {
228 height: 16px;
229 padding: 0 6px;
230 font-size: 10px;
231 line-height: 16px;
232 color: var(--journal-metadata-indicator);
233 text-transform: lowercase;
234 border-radius: 20px;
235 }
236
237 @media (width <= 767px) {
238 .journal p {
239 flex-wrap: wrap;
240 }
241
242 /* show a colored top border for all entries */
243 .journal > li > p {
244 border-top: thin solid var(--entry-background);
245 }
246
247 .journal .head .flag {
248 flex-grow: 1;
249 text-align: left;
250 }
251
252 .journal .description {
253 flex: inherit;
254 order: 1; /* push to second row */
255 width: 100%;
256 padding-left: 0;
257 }
258
259 .journal .indicators {
260 flex-grow: 1;
261 }
262
263 .journal .balance .num {
264 width: 35%;
265 }
266
267 .journal .balance .change.num {
268 display: none;
269 }
270
271 .journal .postings .datecell,
272 .journal .postings .flag {
273 display: none;
274 }
275
276 .journal .postings .description {
277 flex-grow: 1;
278 order: inherit;
279 width: inherit;
280 }
281
282 .journal .metadata dt,
283 .journal .metadata dd {
284 margin-left: initial;
285 }
286 }