Skip to content

Commit b1f398d

Browse files
committed
replace transparent 1px trace border with non-transparent one, and be a lot smarter about our rounded corner borders
1 parent e4c7dde commit b1f398d

1 file changed

Lines changed: 27 additions & 10 deletions

File tree

src/web/css/editor.css

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ div.repl-animation {
486486

487487
div.trace {
488488
overflow-x: auto;
489-
padding-top: 1px;
489+
margin-top: 1px;
490490
}
491491
div.trace.error {
492492
background-color: var(--trace-err-bg);
@@ -2304,25 +2304,42 @@ table.pyret-table.pyret-matrix {
23042304
}
23052305

23062306

2307-
table.pyret-table { width: 98%; overflow: scroll; }
2308-
/* make sure rotate elts in the table (like roughnums!) don't punch through */
2307+
table.pyret-table { width: 98%; overflow: scroll; border: none; }
2308+
/* make sure rotated elts in the table (like roughnums!) don't punch through */
23092309
table.pyret-table thead {
23102310
box-shadow: 0px 2px 2px var(--shadow-color);
23112311
position: sticky;
23122312
top: 0;
23132313
z-index: 1;
23142314
}
23152315

2316-
table.pyret-table tr:last-child td:first-child {
2317-
border-bottom-left-radius: var(--table-radius);
2316+
/* top/bottom borders on the first and last rows */
2317+
table.pyret-table th { border-top: solid 1px black; }
2318+
table.pyret-table > :nth-last-child(1 of :has(tr)) > tr:last-child td {
2319+
border-bottom: solid 1px black;
23182320
}
2319-
table.pyret-table tr:last-child td:last-child {
2320-
border-bottom-right-radius: var(--table-radius);
2321+
2322+
/* left/right borders on the first and last cells */
2323+
table.pyret-table td:first-child, table.pyret-table th:first-child {
2324+
border-left: solid 1px black;
2325+
}
2326+
table.pyret-table td:last-child, table.pyret-table th:last-child {
2327+
border-right: solid 1px black;
23212328
}
23222329

2323-
/* style first and last th elements to use the table's rounded corners */
2324-
table.pyret-table th:first-child { border-top-left-radius: var(--table-radius); }
2325-
table.pyret-table th:last-child { border-top-right-radius: var(--table-radius); }
2330+
/* rounded borders for corners */
2331+
table.pyret-table th:first-child {
2332+
border-top-left-radius: var(--table-radius);
2333+
}
2334+
table.pyret-table th:last-child {
2335+
border-top-right-radius: var(--table-radius);
2336+
}
2337+
table.pyret-table > :nth-last-child(1 of :has(tr)) > tr:last-child td:first-child {
2338+
border-bottom-left-radius: var(--table-radius);
2339+
}
2340+
table.pyret-table > :nth-last-child(1 of :has(tr)) > tr:last-child td:last-child {
2341+
border-bottom-right-radius: var(--table-radius);
2342+
}
23262343

23272344

23282345

0 commit comments

Comments
 (0)