Skip to content

Commit

Permalink
Use padding and smarter positioning for admin dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Nov 22, 2023
1 parent 0b442d6 commit 89bfac4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/lib/app.postcss
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,16 @@ input[readonly]:focus {
@apply flex-nowrap;
}

/* open dropdowns upwards for the last 2 table rows */
table tr:nth-last-child(-n + 2) .dropdown {
/* open dropdowns upwards for the last 2 table rows as long as they're not the first 2 */
table tr:nth-last-child(-n + 2):not(:nth-child(-n + 2)) .dropdown {
@apply dropdown-top;
}

/* add some padding for dropdowns if the table has less than 3 elements */
.overflow-x-auto:has(> table .dropdown):not(:has(> table tr:nth-child(3))) {
padding-bottom: 80px;
}

.prose :where(a) {
/* bold is just a bit too loud, especially when there are lots of link (e.g. our login welcome message) */
@apply font-normal;
Expand Down

0 comments on commit 89bfac4

Please sign in to comment.