[OCaml] Mobile-friendly clone of cgit.
refactor narrow #main ul li > a to specific list selectors
Replace overly broad #main ul li > a with targeted #branch-list, #tag-list, #file-tree selectors. Simplify repo list link rule from #main #repositories li > a to #repositories li > a since the specificity arms race is eliminated.
lib/static/styles.css
@@ -279,7 +279,11 @@
279
279
280
280
/* File/branch/tag list items (still use li > a wrapping pattern) */
281
281
282
Removed:
#main ul li > a {
282
Added:
/* File/branch/tag list items — li > a wrapping pattern */
283
Added:
284
Added:
#branch-list li > a,
285
Added:
#tag-list li > a,
286
Added:
#file-tree li > a {
283
287
display: flex;
284
288
align-items: center;
285
289
gap: 1em;
@@ -288,11 +292,15 @@
288
292
box-sizing: border-box;
289
293
}
290
294
291
Removed:
#main ul li > a:hover {
295
Added:
#branch-list li > a:hover,
296
Added:
#tag-list li > a:hover,
297
Added:
#file-tree li > a:hover {
292
298
text-decoration: underline;
293
299
}
294
300
295
Removed:
#main ul li:has(> a:hover) {
301
Added:
#branch-list li:has(> a:hover),
302
Added:
#tag-list li:has(> a:hover),
303
Added:
#file-tree li:has(> a:hover) {
296
304
background-color: var(--color-hover-bg);
297
305
}
298
306
@@ -356,8 +364,8 @@
356
364
gap: 0 1em;
357
365
}
358
366
359
Removed:
#main #repositories li > a,
360
Removed:
#main .repo-section li > a {
367
Added:
#repositories li > a,
368
Added:
.repo-section li > a {
361
369
display: flex;
362
370
align-items: center;
363
371
flex: 1;